aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMCopyTable.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-17 16:24:13 +0000
committerrowanbeentje <rowan@beent.je>2010-01-17 16:24:13 +0000
commitab9b7d9dad3dcd3a2675d33684729637e5509d42 (patch)
treeb1655480f033fdcbbd12caed945fcead636042dc /Source/CMCopyTable.m
parentfc6348bb6cadfedba1fd19615f2af83d8e8098ae (diff)
downloadsequelpro-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/CMCopyTable.m')
-rw-r--r--Source/CMCopyTable.m4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m
index 6fd83cee..621fc08f 100644
--- a/Source/CMCopyTable.m
+++ b/Source/CMCopyTable.m
@@ -232,7 +232,6 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2002;
rowCounter++;
for ( c = 0; c < numColumns; c++ )
{
- // rowData = [[tableData objectAtIndex:rowIndex] objectAtIndex:[[columnMappings objectAtIndex:c] integerValue]];
col = NSArrayObjectAtIndex(columns, c);
rowData = [dataSource tableView:self
objectValueForTableColumn:col
@@ -417,10 +416,9 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2002;
/*
* Init self with data coming from the table content view. Mainly used for copying data properly.
*/
-- (void)setTableInstance:(id)anInstance withTableData:(id)theTableData withColumns:(NSArray *)columnDefs withTableName:(NSString *)aTableName withConnection:(id)aMySqlConnection
+- (void)setTableInstance:(id)anInstance withColumns:(NSArray *)columnDefs withTableName:(NSString *)aTableName withConnection:(id)aMySqlConnection
{
selectedTable = aTableName;
- tableData = theTableData;
mySQLConnection = aMySqlConnection;
tableInstance = anInstance;