diff options
author | rowanbeentje <rowan@beent.je> | 2013-08-13 23:49:31 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-08-13 23:49:31 +0000 |
commit | ef60b2022d50b99e6de78cc301bf71e8b336ae0e (patch) | |
tree | 175e38fc968dec070ca8a872f7b87502b62e8c82 /Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m | |
parent | 80c152501303c0ed7bd530f5e05bc7e5a6fba7f5 (diff) | |
download | sequelpro-ef60b2022d50b99e6de78cc301bf71e8b336ae0e.tar.gz sequelpro-ef60b2022d50b99e6de78cc301bf71e8b336ae0e.tar.bz2 sequelpro-ef60b2022d50b99e6de78cc301bf71e8b336ae0e.zip |
Rework table content and custom query data loading and storage for speed increases and lower memory usage:
- Add a new SPMySQLStreamingResultStore class to SPMySQL.framework. This class acts as both a result set and a data store for the accompanying data, storing the row information in a custom format in a custom malloc zone.
- Amend SPDataStorage to wrap the new class, so original result information is stored in the one location in the custom format. Any edited information is handled by SPDataStorage for clean separation
- Rework table content and custom query data data stores to use the new class. This significantly speeds up data loading, resulting in faster data loads if they weren't previously network constrained, or lower CPU usage otherwise. The memory usage is also lowered, with the memory overhead for many small cells being enormously reduced.
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m index 4d18db18..dbf3f66a 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m @@ -63,7 +63,10 @@ if (previousSeekPosition) [self seekToRow:previousSeekPosition]; // Instead of empty arrays, return nil if there are no rows. - if (![rowsToReturn count]) return nil; + if (![rowsToReturn count]) { + [rowsToReturn release]; + return nil; + } return [rowsToReturn autorelease]; } |