-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add cache of query schemas to results view #3862
Conversation
c04893c
to
605712b
Compare
extensions/ql-vscode/src/language-support/contextual/cached-operation.ts
Fixed
Show fixed
Hide fixed
extensions/ql-vscode/src/language-support/contextual/cached-operation.ts
Fixed
Show fixed
Hide fixed
605712b
to
1982f52
Compare
I merged into main. The E2E tests should be fixed now. |
Hmmm....maybe not. |
I merged in main in another PR and got the same error: https://github.com/github/vscode-codeql/actions/runs/12282822206/job/34274881774?pr=3867 |
It is currently expected to fail due to a limitation in the E2E tests: they always install the released version, while the tests are testing the current version on the branch. See #3853. The E2E tests are not required, so they can be ignored. |
We need to do a new extension release in order to get the tests passing again. See #3869. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (after updating the changelog).
if (this.generation !== origGeneration) { | ||
// Cache was reset in the meantime so don't trust this | ||
// result enough to cache it. | ||
return result; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
The pagination this does is slow as it scan to compute the index of each page. By caching we mostly only do the scanning once and then later we can change page quickly. Unfortunately we must clear the cache on sorting though as that may reuse an existing bqrs.
For very large result sets (my test had 20,000,000 tuples) this takes the time to change page from about 10s to seemingly instant to me (I didn't precisely measure this, I just looked at a clock to get 10s) making looking through sorted data for certain results much easier.
I also removed a call to bqrs info with a page size of zero. Actually passing the pageSize of zero to the cli would result in an error, but as 0 is falsy so we treat it the same as the case without a pagesize. It seems clearer to just not provide the argument.
I am not sure why the E2E tests are failing though so I may need help debugging that.