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

chore(libzip): set TEXTDECODER to 2 #4699

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Conversation

paul-soporan
Copy link
Member

What's the problem this PR addresses?

From https://github.com/emscripten-core/emscripten/blob/f5379af65490290aaae466a31b29b5d8e556bb60/src/settings.js#L1639-L1645:

If set to 2, we assume TextDecoder is present and usable, and do not emit
any JS code to fall back if it is missing.

Since TextDecoder has been fully available since Node 11.0.0, we can make Emscripten always use it.

How did you fix it?

Set -s TEXTDECODER=2.

libzipAsync.js size Bundle size
Before 377588 2813588
After 376820 2812671

Performance is the same.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

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

LGTM!

Performance is the same.

We could still make the PR title perf: since the bundle size is reduced 🤔

@arcanis arcanis merged commit 76e4cc6 into master Aug 1, 2022
@arcanis arcanis deleted the paul/chore/textdecoder branch August 1, 2022 16:37
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.

3 participants