diff options
author | rowanbeentje <rowan@beent.je> | 2010-01-17 16:24:13 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-01-17 16:24:13 +0000 |
commit | ab9b7d9dad3dcd3a2675d33684729637e5509d42 (patch) | |
tree | b1655480f033fdcbbd12caed945fcead636042dc /Source/CustomQuery.h | |
parent | fc6348bb6cadfedba1fd19615f2af83d8e8098ae (diff) | |
download | sequelpro-ab9b7d9dad3dcd3a2675d33684729637e5509d42.tar.gz sequelpro-ab9b7d9dad3dcd3a2675d33684729637e5509d42.tar.bz2 sequelpro-ab9b7d9dad3dcd3a2675d33684729637e5509d42.zip |
Add a new SPDataStorage class, and use it in TableContent and CustomQuery:
- SPDataStorage is a class designed for a 2D array of fixed-width data storage, replacing the current method of nested NSMutableArrays. NSFastEnumerator compatible.
- Overall memory overhead for table storage in memory reduced by 1.2-1.4x - this almost gains back the large memory jump seen for 64 bit
- Some operations (adding data, retrieving a single cell's data) are faster than nested NSMutableArrays; some operations (requesting a row as an NSArray) are slightly slower as the data needs to be converted, but overall result is a slight speed gain.
(- Could be used in future to store SQL results in C datatypes, avoiding very high NSObject overhead for numbers and short strings)
Diffstat (limited to 'Source/CustomQuery.h')
-rw-r--r-- | Source/CustomQuery.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index 1c9a32bf..8e2e9fdd 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -49,7 +49,7 @@ #define SP_HISTORY_SAVE_MENUITEM_TAG 300001 #define SP_HISTORY_CLEAR_MENUITEM_TAG 300002 -@class SPQueryFavoriteManager; +@class SPQueryFavoriteManager, SPDataStorage; @interface CustomQuery : NSObject { @@ -128,9 +128,9 @@ WebHistory *helpHistory; NSString *helpHTMLTemplate; - NSMutableArray *fullResult; - pthread_mutex_t fullResultLock; - NSInteger fullResultCount; + SPDataStorage *resultData; + pthread_mutex_t resultDataLock; + NSInteger resultDataCount; NSArray *cqColumnDefinition; NSString *lastExecutedQuery; NSInteger editedRow; |