From b71f3aa640f2a8a80b0ef4bb6a39b62b3b92f339 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 8 Jul 2010 12:10:17 +0000 Subject: Given that the user can now decide how often a new INSERT statement is created when performing an SQL dump, replace the use of stringWithFormat: with appendString: for a potential speed improvement. --- Source/SPSQLExporter.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index d7a82666..ad16a119 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -427,8 +427,12 @@ if ((([self sqlInsertDivider] == SPSQLInsertEveryNDataBytes) && (queryLength >= ([self sqlInsertAfterNValue] * 1024))) || (([self sqlInsertDivider] == SPSQLInsertEveryNRows) && (k == [self sqlInsertAfterNValue]))) { - [sqlString appendString:[NSString stringWithFormat:@");\n\nINSERT INTO %@ (%@)\nVALUES\n\t(", [tableName backtickQuotedString], [fieldNames componentsJoinedAndBacktickQuoted]]]; - + [sqlString appendString:@");\n\nINSERT INTO "]; + [sqlString appendString:[tableName backtickQuotedString]]; + [sqlString appendString:@" ("]; + [sqlString appendString:[fieldNames componentsJoinedAndBacktickQuoted]]; + [sqlString appendString:@")\nVALUES\n\t("]; + queryLength = 0, k = 0; // Use the opportunity to drain and reset the autorelease pool -- cgit v1.2.3