diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-18 21:34:51 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-18 21:34:51 +0000 |
commit | 515e93007d444c33ca82f7c43b76cf8c228cb9d6 (patch) | |
tree | 2a65e3bff8c7c50428249c0fcb2b2931c9ab279e /Source/SPExportController.m | |
parent | c040e154bc58fac262324a0c40ef5572d5ef28c8 (diff) | |
download | sequelpro-515e93007d444c33ca82f7c43b76cf8c228cb9d6.tar.gz sequelpro-515e93007d444c33ca82f7c43b76cf8c228cb9d6.tar.bz2 sequelpro-515e93007d444c33ca82f7c43b76cf8c228cb9d6.zip |
• added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline function
- id o = NSArrayObjectAtIndex(anArray, index) :== id o = [anArray objectAtIndex:index]
- this speed up it ~3µs per call
- replaced that inline function for such calls within loops to speed up them
• used IMP function pointers for keepAlive calls within queryString:
• set -O3 (Fastest) compiler option
• allow in preference pane "Tables" to set the Limit up to 50000
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r-- | Source/SPExportController.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m index bd72c9d2..b76ea41f 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -24,6 +24,7 @@ #import "SPExportController.h" #import "TablesList.h" +#import "SPArrayAdditions.h" @implementation SPExportController @@ -78,7 +79,7 @@ for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) { [tables addObject:[NSMutableArray arrayWithObjects: [NSNumber numberWithBool:YES], - [[queryResult fetchRowAsArray] objectAtIndex:0], + NSArrayObjectAtIndex([queryResult fetchRowAsArray], 0), nil ]]; } @@ -118,9 +119,9 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn id returnObject = nil; if ( [[aTableColumn identifier] isEqualToString:@"switch"] ) { - returnObject = [[tables objectAtIndex:rowIndex] objectAtIndex:0]; + returnObject = NSArrayObjectAtIndex([tables objectAtIndex:rowIndex], 0); } else { - returnObject = [[tables objectAtIndex:rowIndex] objectAtIndex:1]; + returnObject = NSArrayObjectAtIndex([tables objectAtIndex:rowIndex], 1); } return returnObject; |