Skip to content

Initialize the LegalizeJSInterface vector once, not once in each function #2614

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 1 commit into from
Jan 23, 2020

Conversation

kripken
Copy link
Member

@kripken kripken commented Jan 23, 2020

I missed this in the review of #2451 - this was doing quadratic
work, each function touched the entire array which is the size
of the functions.

This speeds up the pspdfkit testcase from the mailing list from
several minutes (15 on CI; I stopped measuring after 2 minutes
locally) to 5 seconds. I suspect this was not noticed earlier because
that testcase has a very large number of functions, which
hit this issue especially hard.

@kripken kripken requested a review from aheejin January 23, 2020 00:46
Copy link
Member

@aheejin aheejin left a comment

Choose a reason for hiding this comment

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

Sorry for the trouble 😢 Thank you!

@kripken
Copy link
Member Author

kripken commented Jan 23, 2020

Test failures are unrelated, #2615

Landing as this isn't related to them and is an urgent fix.

@kripken kripken merged commit d6d5655 into master Jan 23, 2020
@kripken kripken deleted the fast branch January 23, 2020 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants