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/TableDocument.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/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 270ebe5b..f98a2c1c 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -40,6 +40,7 @@ #import "SPTableData.h" #import "SPDatabaseData.h" #import "SPStringAdditions.h" +#import "SPArrayAdditions.h" #import "SPQueryConsole.h" #import "CMMCPConnection.h" #import "CMMCPResult.h" @@ -794,7 +795,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum for (i = 0 ; i < [queryResult numOfRows] ; i++) { - [chooseDatabaseButton addItemWithTitle:[[queryResult fetchRowAsArray] objectAtIndex:0]]; + [chooseDatabaseButton addItemWithTitle:NSArrayObjectAtIndex([queryResult fetchRowAsArray], 0)]; } (![self database]) ? [chooseDatabaseButton selectItemAtIndex:0] : [chooseDatabaseButton selectItemWithTitle:[self database]]; @@ -951,7 +952,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum int r = [theResult numOfRows]; if (r) [theResult dataSeek:0]; for ( i = 0 ; i < r ; i++ ) { - dbName = [[theResult fetchRowAsArray] objectAtIndex:0]; + dbName = NSArrayObjectAtIndex([theResult fetchRowAsArray], 0); } if(![dbName isKindOfClass:[NSNull class]]) { if(![dbName isEqualToString:selectedDatabase]) { |