Skip to content

How to speed up the execution #19471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Cheap-Cheer opened this issue May 11, 2025 · 1 comment
Open

How to speed up the execution #19471

Cheap-Cheer opened this issue May 11, 2025 · 1 comment
Labels
awaiting-response The CodeQL team is awaiting further input or clarification from the original reporter of this issue. question Further information is requested

Comments

@Cheap-Cheer
Copy link

When executing a CodeQL ql query, it shows that it needs to compile first, but the compilation time is too long. A simple file often takes 10 to 20 seconds, which causes the total time for executing a query to be around 30 seconds. Is there any way to speed up the execution? Thank you!

@Cheap-Cheer Cheap-Cheer added the question Further information is requested label May 11, 2025
@redsun82
Copy link
Contributor

👋 @Cheap-Cheer

There are some things you can try to improve the UX with regard to this, though ultimately compiling queries is a costly step.

  • if you are compiling a query you are writing yourself, you can try passing -j0 to make codeql run compilation in parallel using as many threads as available on the system
  • if you are using an off-the-shelf query, you can download what we call a bundle from the codeql-action releases here. Those differ from the CLI releases in that they also include pre-compiled queries for all languages. That is what codeql-action uses, so that it can get to evaluating queries straight away without doing the compilation step.

@redsun82 redsun82 added the awaiting-response The CodeQL team is awaiting further input or clarification from the original reporter of this issue. label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response The CodeQL team is awaiting further input or clarification from the original reporter of this issue. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants