Skip to content

JS: fix the NodeJS::Requireperformance regression #2466

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

Merged
merged 2 commits into from
Nov 28, 2019

Conversation

esbena
Copy link
Contributor

@esbena esbena commented Nov 28, 2019

This thouroughly fixes the performance of the regression in #2347.

Caching the charpred of NodeJS::Require seems reasonable since it makes us handle require and import with equal performance in the later stages. When NodeJS::Require is not explicitly cached, we may need to reevaluate non-trivial predicates to identify it, whereas the syntactic import always is identified for free in practice.

I am still running evaluations, but a preliminary evaluation shows that #2347 with cached is faster on definitions.ql than the master branch it was merged into!

@esbena esbena added the WIP This is a work-in-progress, do not merge yet! label Nov 28, 2019
@esbena esbena added this to the 1.23 milestone Nov 28, 2019
@esbena esbena requested a review from a team as a code owner November 28, 2019 07:13
Copy link
Contributor

@asgerf asgerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@esbena
Copy link
Contributor Author

esbena commented Nov 28, 2019

Another successful evaluation: now on top of 1.23: https://git.semmle.com/esben/dist-compare-reports/tree/js/fix-mjs-check_1574947495528.

Do we need a full dist-compare as well, or should we let that be part of the 1.22/1.23 comparison?

@asgerf
Copy link
Contributor

asgerf commented Nov 28, 2019

Do we need a full dist-compare as well, or should we let that be part of the 1.22/1.23 comparison?

I'd say let it be part of the 1.22/1.23 comparison as we'd otherwise just delay that comparison.

@esbena esbena removed the WIP This is a work-in-progress, do not merge yet! label Nov 28, 2019
@semmle-qlci semmle-qlci merged commit d59ea3d into github:rc/1.23 Nov 28, 2019
@asgerf asgerf added the JS label Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants