aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryConsole.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-18 08:18:33 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-18 08:18:33 +0000
commitb54a768bc63b01475a79426ea519d22217a001c5 (patch)
tree27b6124e2d7488f7a7c05c69de79fee720f96e32 /Source/SPQueryConsole.m
parente1af7c62ee26b33be9ced00561bda8873ada8fc6 (diff)
downloadsequelpro-b54a768bc63b01475a79426ea519d22217a001c5.tar.gz
sequelpro-b54a768bc63b01475a79426ea519d22217a001c5.tar.bz2
sequelpro-b54a768bc63b01475a79426ea519d22217a001c5.zip
• some tiny improvements to speed up queryString:
- cache the function pointer for delegate willPerformQuery: - if Console Log window is NOT visible suppress reloadData and scrolling to last line (this speeds it up remarkably); if user opens the Console log window it will be synchronized - timeIntervall for execution time will be divide by CLOCKS_PER_SEC in [NSString stringForTimeInterval] - removed for utf8 enc in cString the return UTF8String (no significant difference) • now execution time shows only the time for mysql_real_query
Diffstat (limited to 'Source/SPQueryConsole.m')
-rw-r--r--Source/SPQueryConsole.m14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/SPQueryConsole.m b/Source/SPQueryConsole.m
index a7c7263d..dab9a9a0 100644
--- a/Source/SPQueryConsole.m
+++ b/Source/SPQueryConsole.m
@@ -365,6 +365,12 @@ static SPQueryConsole *sharedQueryConsole = nil;
return [[self window] validateMenuItem:menuItem];
}
+- (void)updateEntries
+{
+ [consoleTableView reloadData];
+ [consoleTableView scrollRowToVisible:([messagesVisibleSet count] - 1)];
+}
+
/**
* Standard dealloc.
*/
@@ -494,9 +500,11 @@ static SPQueryConsole *sharedQueryConsole = nil;
[clearConsoleButton setEnabled:YES];
}
- // Reload the table and scroll to the new message
- [consoleTableView reloadData];
- [consoleTableView scrollRowToVisible:([messagesVisibleSet count] - 1)];
+ // Reload the table and scroll to the new message if it's visible (for speed)
+ if ( [[self window] isVisible] ) {
+ [consoleTableView reloadData];
+ [consoleTableView scrollRowToVisible:([messagesVisibleSet count] - 1)];
+ }
}
/**