timeseries / qstudio

qStudio - Free SQL Analysis Tool
https://www.timestored.com/qstudio/
Apache License 2.0
555 stars 25 forks source link

High CPU after selecting and copying 50 columns by 1000 rows #88

Open richb-hanover opened 1 month ago

richb-hanover commented 1 month ago

Running qStudio 3.07 on a Macbook Pro with macOS 12.7.5. I launched it with java -jar qstudio.jar. I ran a query that produced about 50 columns and 1,000 rows of data. It worked fine. I then hit Select All then Copy, and pasted into a spreadsheet. That worked as expected.

I heard the fans running on my laptop, and saw that qstudio.jar was using over 100% of one of the cores. That persisted until I quit qStudio a minute or two later. I also noticed the "beachball" when mousing around qStudio, another symptom of high CPU. I found the lines below in the terminal.

I also attach the contents from the terminal at startup. What other diagnostic info could I provide? Many thanks.

2024-09-14 07:20:26.464 java[87571:1112507] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_selectedRangeWithReply:) block performed very slowly (1.03 secs).
2024-09-14 07:23:07.046 java[87571:1112507] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_selectedRangeWithReply:) block performed very slowly (2.23 secs).
2024-09-14 07:23:13.974 java[87571:1112507] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_deadKeyStateWithReply:) block performed very slowly (1.16 secs).
2024-09-14 07:23:16.212 java[87571:1112507] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_selectedRangeWithReply:) block performed very slowly (2.24 secs).
2024-09-14 07:23:41.249 java[87571:1112507] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_deadKeyStateWithReply:) block performed very slowly (2.29 secs).
2024-09-14 07:23:41.249 java[87571:1112507] IMKClient Stall detected, *please Report* your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_selectedRangeWithReply:) block performed very slowly (2.03 secs).
Sep 14, 2024 7:23:41 AM com.timestored.qstudio.CommonActions sendQuery
INFO: Send Query->

Startup info

√ /Applications % java -jar qstudio.jar
Sep 14, 2024 7:34:25 AM com.timestored.misc.DynamicClassLoader loadInstances
INFO: Searching for plugins in folder: /Users/richb/qstudio/libs
Sep 14, 2024 7:34:25 AM com.timestored.misc.DynamicClassLoader visitJarFileJavaClasses
INFO: Looking for plugins inside: /Users/richb/qstudio/libs/sqlite-jdbc-3.42.0.0.jar
Sep 14, 2024 7:34:25 AM com.timestored.misc.DynamicClassLoader loadInstances
INFO: Searching for plugins in folder: /Users/richb/qstudio/libs
Sep 14, 2024 7:34:25 AM com.timestored.misc.DynamicClassLoader visitJarFileJavaClasses
INFO: Looking for plugins inside: /Users/richb/qstudio/libs/sqlite-jdbc-3.42.0.0.jar
Sep 14, 2024 7:34:25 AM com.timestored.misc.DynamicClassLoader$InstanceFinderVisitor visit
INFO: Found Plugin with correct interface: org.sqlite.JDBC
Sep 14, 2024 7:34:25 AM com.timestored.qstudio.QStudioLauncher main
SEVERE: Could not load a plugin due to Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @40f9161a
/Applications
Sep 14, 2024 7:34:25 AM com.timestored.docs.OpenDocumentsModel addDocument
INFO: addDocument: new 1
Warning: the fonts "Times" and "Times" are not available for the Java logical font "Serif", which may have unexpected appearance or behavior. Re-enable the "Times" font to remove this warning.
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: Starting QStudioLauncher  launch() ###################################
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: version = 3.07
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: current dir = /Applications/.
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: PATH = /Users/richb/.local/bin:/Applications/Tools-Developer/Racket:/Users/richb/.pyenv/shims:/Users/richb/.pyenv/bin:/Users/richb/.deno/bin:/Users/richb/.pyenv/bin:/Users/richb/.nvm/versions/node/v20.9.0/bin:/Users/richb/.cargo/bin:/opt/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/usr/libexec:/Applications/Tools-Developer/Racket/bin:/Users/richb/.rvm/bin
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: JAVA_HOME = null
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: java.version =16.0.1
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: os.name =Mac OS X
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: user.home =/Users/richb
Sep 14, 2024 7:34:28 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: user.dir =/Applications
Sep 14, 2024 7:34:28 AM com.timestored.connections.ConnectionManager reloadFromPreferences
WARNING: stored conns and current conns disagreed, using stored values
Sep 14, 2024 7:34:28 AM com.timestored.connections.ConnectionManager reloadFromPreferences
WARNING: serverConns = []
Sep 14, 2024 7:34:28 AM com.timestored.connections.ConnectionManager reloadFromPreferences
WARNING: sConns = [ServerConfig{name=\Users\richb\github\TaxFairness\Property_In_Lyme.sqlite, username=, host=localhost, port=0, cstoreType=SQLITE_JDBC, database=jdbc:sqlite:/Users/richb/github/TaxFairness/Property_In_Lyme.sqlite}]
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
Sep 14, 2024 7:34:29 AM com.timestored.qstudio.QStudioFrame <init>
INFO: Starting QStudioFrame Constructor
MODELS = 171.165194
Warning: the fonts "Times" and "Times" are not available for the Java logical font "Serif", which may have unexpected appearance or behavior. Re-enable the "Times" font to remove this warning.
Warning: the fonts "Times" and "Times" are not available for the Java logical font "Serif", which may have unexpected appearance or behavior. Re-enable the "Times" font to remove this warning.
Sep 14, 2024 7:34:29 AM com.timestored.swingxx.FileTreePanel refreshGui
INFO: FileTreePanel refreshGui
Sep 14, 2024 7:34:29 AM com.timestored.swingxx.FileTreePanel refreshGui
INFO: FileTreePanel refreshGui
Sep 14, 2024 7:34:29 AM com.timestored.qstudio.servertree.ServerListPanel refreshGui
INFO: refreshGui
Sep 14, 2024 7:34:30 AM com.timestored.sqldash.model.AbstractWidget configChanged
INFO: Widget 0 configChanged
Sep 14, 2024 7:34:30 AM com.timestored.sqldash.model.AbstractWidget configChanged
INFO: Widget 0 configChanged
Sep 14, 2024 7:34:30 AM com.timestored.swingxx.FileTreePanel refreshGui
INFO: FileTreePanel refreshGui
ENDER = 1494.939885
Sep 14, 2024 7:34:30 AM com.timestored.qstudio.model.AdminModel refresh
INFO: AdminModel hard Refresh
Sep 14, 2024 7:34:30 AM com.timestored.qstudio.QStudioFrame <init>
INFO: Finished QStudioFrame Constructor
Sep 14, 2024 7:34:30 AM com.timestored.qstudio.servertree.ServerListPanel refreshGui
INFO: refreshGui
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel setSelectedFolder
INFO: setSelectedFolder: null
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel addDocument
INFO: addDocument: new 2
Sep 14, 2024 7:34:30 AM com.timestored.docs.BackgroundDocumentsSaver restoreDocuments
INFO: attempting to restore existing known document
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel openDocument
INFO: openDocument: CleanScrapedDataView.prql
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel setSelectedDocument
INFO: setSelectedDocument: CleanScrapedDataView.prql
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel closeDocument
INFO: closeDocument: new 1
Sep 14, 2024 7:34:30 AM com.timestored.qstudio.QStudioLauncher$2 launch
INFO: Ending QStudioLauncher launch()
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel setSelectedDocument
INFO: setSelectedDocument: new 6
Sep 14, 2024 7:34:30 AM com.timestored.docs.OpenDocumentsModel setSelectedDocument
INFO: setSelectedDocument: CleanScrapedDataView.prql
Sep 14, 2024 7:34:30 AM com.timestored.plugins.PluginLoader getCClass
INFO: Could not find class already loaded. Refreshing from folders / jars.
Sep 14, 2024 7:34:31 AM com.timestored.connections.ConnectionManager statusUpdate
INFO: \Users\richb\github\TaxFairness\Property_In_Lyme.sqlite Connected = true
Sep 14, 2024 7:34:31 AM com.timestored.qstudio.servertree.ServerListPanel refreshGui
INFO: refreshGui
Sep 14, 2024 7:34:32 AM com.timestored.qstudio.model.AdminModel$2 run
INFO: refreshing \Users\richb\github\TaxFairness\Property_In_Lyme.sqlite
Sep 14, 2024 7:34:32 AM com.timestored.qstudio.servertree.ServerListPanel refreshGui
INFO: refreshGui
richb-hanover commented 1 month ago

Note: The answer for #84 ("Copy with headers") solves the original problem: exporting directly to Excel is a better solution. But copying a large number of cells shouldn't take a lot of CPU, so this report still stands.