You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The performance when just editing queries, not even compiling or running them yet, is not very good. I get high CPU usage (80% for a notebook with 6 cores / 12 processors, running at > 3 GHz), and high memory usage (> 4 GB just by the OpenJDK process of the extension). And this high CPU and memory usage can sometimes even last a few seconds after you made the last edit in the query source code.
It does not even have to be a complex query or query suite, I even get this for the sample "Hello world".
Example:
CodeQL.extension.performance.issues.mp4
Disabling Microsoft Defender Real-time protection did not seem to make a difference.
I know this comparison might not be fair since CodeQL is quite different from lots of other programming languages, but I haven't seen such performance problems with other programming languages or IDEs yet. For example in a Java project in IntelliJ memory usage is about 2 GB, and writing code might trigger some CPU usage spikes up to 40%, but only for a very short time.
Edit the generated example.ql, write some arbitrary CodeQL code at fairly decent speed
❌ Issue: The extension (more specifically the corresponding "OpenJDK Platform binary" process) shows high CPU and memory usage
Expected behavior
Performance while editing queries should be better
Additional context
Not really sure, and I am really wondering why others have not reported this before.
I don't think there is anything special about my setup, I have no custom CodeQL settings (other than controllerRepo), and as shown above this even occurs for the "Hello world" sample.
Describe the bug
The performance when just editing queries, not even compiling or running them yet, is not very good. I get high CPU usage (80% for a notebook with 6 cores / 12 processors, running at > 3 GHz), and high memory usage (> 4 GB just by the OpenJDK process of the extension). And this high CPU and memory usage can sometimes even last a few seconds after you made the last edit in the query source code.
It does not even have to be a complex query or query suite, I even get this for the sample "Hello world".
Example:
CodeQL.extension.performance.issues.mp4
Disabling Microsoft Defender Real-time protection did not seem to make a difference.
I know this comparison might not be fair since CodeQL is quite different from lots of other programming languages, but I haven't seen such performance problems with other programming languages or IDEs yet. For example in a Java project in IntelliJ memory usage is about 2 GB, and writing code might trigger some CPU usage spikes up to 40%, but only for a very short time.
Maybe related to #594?
Version
(this is not a new problem, I think I have seen this for a few months already)
VS Code:
CodeQL extension:
To reproduce
example.ql, write some arbitrary CodeQL code at fairly decent speed❌ Issue: The extension (more specifically the corresponding "OpenJDK Platform binary" process) shows high CPU and memory usage
Expected behavior
Performance while editing queries should be better
Additional context
Not really sure, and I am really wondering why others have not reported this before.
I don't think there is anything special about my setup, I have no custom CodeQL settings (other than
controllerRepo), and as shown above this even occurs for the "Hello world" sample.