Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

High CPU and memory usage while editing queries

オープン
#4,216 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java, typescript, vscode

調査の方向性

まず、記載されている VS Code と CodeQL 拡張機能のバージョンで問題を再現し、OpenJDK Platform binary プロセスを監視しながら、生成された example.ql を編集する手順に従います。関連する issue #594 を調査し、編集後もどの処理が継続するのかを特定します。原因が特定され、通常の編集時の CPU とメモリの使用量が改善されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug VSCode

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

  1. Open a new empty folder in VS Code
  2. Open the Windows Task Manager next to VS Code
  3. Use the command "CodeQL: Create Query"
  4. Select "Java" as language
  5. 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.

主要言語
TypeScript
スター
539
フォーク
240
平均マージ
2日 18時間
マージ済み PR(30日)
37

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/vscode-codeql のほかの issue

github/vscode-codeql の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。