aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportFileUtilities.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/SPExportFileUtilities.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/SPExportFileUtilities.m')
-rw-r--r--Source/SPExportFileUtilities.m12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m
index 76650556..74e992e4 100644
--- a/Source/SPExportFileUtilities.m
+++ b/Source/SPExportFileUtilities.m
@@ -80,15 +80,15 @@
[header setString:@"<?xml version=\"1.0\"?>\n\n"];
[header appendString:@"<!--\n-\n"];
[header appendString:@"- Sequel Pro XML dump\n"];
- [header appendString:[NSString stringWithFormat:@"- Version %@\n-\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]];
- [header appendString:[NSString stringWithFormat:@"- %@\n- %@\n-\n", SPLOCALIZEDURL_HOMEPAGE, SPDevURL]];
- [header appendString:[NSString stringWithFormat:@"- Host: %@ (MySQL %@)\n", [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]];
- [header appendString:[NSString stringWithFormat:@"- Database: %@\n", [tableDocumentInstance database]]];
- [header appendString:[NSString stringWithFormat:@"- Generation Time: %@\n", [NSDate date]]];
+ [header appendFormat:@"- Version %@\n-\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
+ [header appendFormat:@"- %@\n- %@\n-\n", SPLOCALIZEDURL_HOMEPAGE, SPDevURL];
+ [header appendFormat:@"- Host: %@ (MySQL %@)\n", [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]];
+ [header appendFormat:@"- Database: %@\n", [tableDocumentInstance database]];
+ [header appendFormat:@"- Generation Time: %@\n", [NSDate date]];
[header appendString:@"-\n-->\n\n"];
if (exportSource == SPTableExport) {
- [header appendString:[NSString stringWithFormat:@"<%@>\n\n", [[tableDocumentInstance database] HTMLEscapeString]]];
+ [header appendFormat:@"<%@>\n\n", [[tableDocumentInstance database] HTMLEscapeString]];
}
[file writeData:[header dataUsingEncoding:NSUTF8StringEncoding]];