High CPU and memory usage while editing queries
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java, typescript, vscode
- Lĩnh vực
- developer-experience, performance, tooling
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện sự cố với các phiên bản VS Code và tiện ích mở rộng CodeQL được liệt kê, làm theo các bước để chỉnh sửa example.ql đã tạo trong khi theo dõi tiến trình OpenJDK Platform binary. Điều tra issue #594 liên quan và xác định công việc nào tiếp tục sau khi chỉnh sửa; được xem là hoàn tất khi đã xác định nguyên nhân và cải thiện mức sử dụng CPU và bộ nhớ trong quá trình chỉnh sửa thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 539
- Fork
- 240
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 37
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/vscode-codeql
-
bug VSCode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/vscode-codeql#4471 · 1 bình luận ·
-
bug enhancement VSCode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/vscode-codeql#592 · 2 bình luận ·
-
enhancement VSCode
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
github/vscode-codeql#4432 · 1 bình luận ·
-
bug VSCode
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
github/vscode-codeql#4339 · 1 bình luận ·
Tất cả issue của github/vscode-codeql
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·