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/SPNarrowDownCompletion.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/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index e5dc43ea..591b40d0 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -27,6 +27,7 @@ // More info at <http://code.google.com/p/sequel-pro/> #import "SPNarrowDownCompletion.h" +#import "SPArrayAdditions.h" #import "ImageAndTextCell.h" #import <Foundation/NSObjCRuntime.h> @@ -268,9 +269,9 @@ for(i=0; i<[newFiltered count]; i++) { if(dictMode) - item = [newFiltered objectAtIndex:i]; + item = NSArrayObjectAtIndex([newFiltered objectAtIndex:i], 0); else - item = [[newFiltered objectAtIndex:i] objectForKey:@"display"]; + item = [NSArrayObjectAtIndex([newFiltered objectAtIndex:i], 0) objectForKey:@"display"]; // If space in suggestion add space to allowed input chars if(!spaceInSuggestion && [item rangeOfString:@" "].length) { [textualInputCharacters addCharactersInString:@" "]; |