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

use a fresh WebAssembly instance for each SourceMapConsumer #477

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nornagon
Copy link
Contributor

@nornagon nornagon commented Feb 16, 2023

This works around WebAssembly memory limits.

I tried to benchmark this using the code in bench/, but it seems like that code is stale? I couldn't get it to run using the instructions :(

Wrapping WebAssembly.instantiate in console.time showed it takes around 0.1ms on my machine on average, though, which is promising.

This approach would also mean you could drop SourceMapConsumer.destroy, as the WASM memory would be automatically GC'd.

Fixes #476.

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.

Frequently hitting 'unreachable' errors with many source maps in memory
1 participant