aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataImport.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-08-20 10:02:00 +0000
committerBibiko <bibiko@eva.mpg.de>2010-08-20 10:02:00 +0000
commitd17a6b638e529694685a333162bbf6fec6c7fc08 (patch)
tree5c72506af7bf75299c093ce6a47b7cc4a956e0ff /Source/SPDataImport.m
parentdabf6466f11e5936ee871b8b3dd573020a142586 (diff)
downloadsequelpro-d17a6b638e529694685a333162bbf6fec6c7fc08.tar.gz
sequelpro-d17a6b638e529694685a333162bbf6fec6c7fc08.tar.bz2
sequelpro-d17a6b638e529694685a333162bbf6fec6c7fc08.zip
• overall replacement of:
[aString appendString:[NSString stringWithFormat:]] by [aString appendFormat:] since it's much more faster • first look at loop where several [aStr appendString:] occur to try to combine them into one appendString or appendFormat since the allocation of memory takes really time Note: I tested all my changes but we should test it further to be sure that I didn't a mistake!
Diffstat (limited to 'Source/SPDataImport.m')
-rw-r--r--Source/SPDataImport.m16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m
index e697ec18..ac1eadc0 100644
--- a/Source/SPDataImport.m
+++ b/Source/SPDataImport.m
@@ -549,7 +549,7 @@
// Check for any errors
if ([mySQLConnection queryErrored] && ![[mySQLConnection getLastErrorMessage] isEqualToString:@"Query was empty"]) {
- [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in query %ld] %@\n", @"error text when multiple custom query failed"), (long)(queriesPerformed+1), [mySQLConnection getLastErrorMessage]]];
+ [errors appendFormat:NSLocalizedString(@"[ERROR in query %ld] %@\n", @"error text when multiple custom query failed"), (long)(queriesPerformed+1), [mySQLConnection getLastErrorMessage]];
}
// Increment the processed queries count
@@ -584,7 +584,7 @@
// Check for any errors
if ([mySQLConnection queryErrored] && ![[mySQLConnection getLastErrorMessage] isEqualToString:@"Query was empty"]) {
- [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in query %ld] %@\n", @"error text when multiple custom query failed"), (long)(queriesPerformed+1), [mySQLConnection getLastErrorMessage]]];
+ [errors appendFormat:NSLocalizedString(@"[ERROR in query %ld] %@\n", @"error text when multiple custom query failed"), (long)(queriesPerformed+1), [mySQLConnection getLastErrorMessage]];
}
// Increment the processed queries count
@@ -972,9 +972,9 @@
if ([mySQLConnection queryErrored]) {
[tableDocumentInstance showConsole:nil];
- [errors appendString:[NSString stringWithFormat:
+ [errors appendFormat:
NSLocalizedString(@"[ERROR in row %ld] %@\n", @"error text when reading of csv file gave errors"),
- (long)(rowsImported+1),[mySQLConnection getLastErrorMessage]]];
+ (long)(rowsImported+1),[mySQLConnection getLastErrorMessage]];
}
if ( insertRemainingRowsAfterUpdate && ![mySQLConnection affectedRows]) {
@@ -989,9 +989,9 @@
[query release];
if ([mySQLConnection queryErrored]) {
- [errors appendString:[NSString stringWithFormat:
+ [errors appendFormat:
NSLocalizedString(@"[ERROR in row %ld] %@\n", @"error text when reading of csv file gave errors"),
- (long)(rowsImported+1),[mySQLConnection getLastErrorMessage]]];
+ (long)(rowsImported+1),[mySQLConnection getLastErrorMessage]];
}
}
@@ -1019,9 +1019,9 @@
[query release];
if ([mySQLConnection queryErrored]) {
- [errors appendString:[NSString stringWithFormat:
+ [errors appendFormat:
NSLocalizedString(@"[ERROR in row %ld] %@\n", @"error text when reading of csv file gave errors"),
- (long)(rowsImported+1),[mySQLConnection getLastErrorMessage]]];
+ (long)(rowsImported+1),[mySQLConnection getLastErrorMessage]];
}
rowsImported++;
[singleProgressBar setDoubleValue:[[parsePositions objectAtIndex:i] doubleValue]];