Skip to content
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

Implement Utf8Helper.getAllowedCharsets() to lazy-load allowedCharsets, make Utf8Helper.allowedCharsets private #176

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

popugashkin
Copy link
Contributor

I've noticed that since 16.3.0, a simple instantiation of SWF() takes way longer than it previously did (around 2 vs .3 seconds on my computer). So I've pinpointed the issue to 4c6ccf0, which added an allowedCharsets static variable in Utf8Helper which was populated in a static {...} block even if it was never going to be used.

This PR implements lazy-loading of Utf8Helper.allowedCharsets via Utf8Helper.getAllowedCharsets(), so that it does not waste time generating when not needed.

…sets`, make `Utf8Helper.allowedCharsets` private
@jindrapetrik jindrapetrik merged commit da38e4f into jindrapetrik:dev Jul 29, 2023
@jindrapetrik
Copy link
Owner

Okay, thank you!

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