High CPU and memory usage while editing queries
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- java, typescript, vscode
- Domaine
- developer-experience, performance, tooling
Piste de recherche
Commencez par reproduire le problème avec les versions indiquées de VS Code et de l’extension CodeQL, en suivant les étapes pour modifier le fichier example.ql généré tout en surveillant le processus OpenJDK Platform binary. Examinez l’issue #594 associée et déterminez quel travail se poursuit après les modifications ; le travail est terminé lorsque la cause est identifiée et que l’utilisation du CPU et de la mémoire pendant une édition ordinaire est améliorée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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:
https://github.com/user-attachments/assets/d5b5cf0c-b6a4-489e-9bfa-18bf3c167a39
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:
Version: 1.106.3 (user setup)
Commit: bf9252a2fb45be6893dd8870c0bf37e2e1766d61
Date: 2025-11-25T22:28:18.024Z
Electron: 37.7.0
ElectronBuildId: 12781156
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
CodeQL extension:
CodeQL extension version: 1.17.6
CodeQL CLI version: 2.23.6
Platform: win32 x64
To reproduce
- Open a new empty folder in VS Code
- Open the Windows Task Manager next to VS Code
- Use the command "CodeQL: Create Query"
- Select "Java" as language
- 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.
- Langage dominant
- TypeScript
- Étoiles
- 539
- Forks
- 240
- Merge moyen
- 2 j 6 h
- PR mergées (30 j)
- 29
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/vscode-codeql
-
bug VSCode
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
github/vscode-codeql#4471 · 1 commentaire ·
-
bug enhancement VSCode
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
github/vscode-codeql#592 · 2 commentaires ·
-
enhancement VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
github/vscode-codeql#4432 · 1 commentaire ·
-
bug VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficulté 3/5 1-2 jours Accessibilité débutants 64/100
github/vscode-codeql#4339 · 1 commentaire ·
Toutes les issues de github/vscode-codeql
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
-
bug via-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
midnightntwrk/midnight-sdk#403 ·