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

Please upgrade source-map to 0.7.2 to get speed improvements #206

Open
andreicristianpetcu opened this issue Mar 4, 2018 · 13 comments
Open

Comments

@andreicristianpetcu
Copy link

The latest source-map which is v0.7.2 got support for WebAssembly and it is 10 times faster than the old one. More info here:

https://github.com/mozilla/source-map/blob/master/CHANGELOG.md#072
http://fitzgeraldnick.com/2018/02/26/speed-without-wizardry.html
https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/
firefox-devtools/debugger#5598

Please update so you would get 10 times speed improvements for your library in Firefox, 9 times in Safari and 5 times in Chrome.

@LinusU
Copy link
Collaborator

LinusU commented Mar 4, 2018

This is awesome, we need to figure out what breaking changes (if any) occurred in 0.7.0, then we are good to go!

PRs welcome!

@LinusU
Copy link
Collaborator

LinusU commented Mar 4, 2018

Breaking change: Drop support for Node < 8. If you want to support older versions of node, please use v0.6 or below.

Hmmmm, this might be a big problem for us... 🤔

@loganfsmyth
Copy link

Is this possible? SourceMapConsumer now returns a Promise, but catching and mapping thrown exceptions needs to be synchronous.

@SimenB
Copy link
Contributor

SimenB commented Mar 18, 2018

Jest is also unable to upgrade due to the lack of a sync API, FWIW

@niieani
Copy link
Contributor

niieani commented Apr 28, 2018

@SimenB Could deasync help here? It hooks into Node's event loop and essentially makes any async operation a sync one.

@devsnek
Copy link

devsnek commented Jun 20, 2019

I published https://www.npmjs.com/package/@snek/source-map-support which works nicely in node and may work in browsers that allow you to load reasonable sized wasms synchronously. It wraps the 0.8.0-beta.0 release of source-map.

@pkit
Copy link

pkit commented May 6, 2021

@andreicristianpetcu
@devsnek there is no case for async source map consumer other than problems of specific ill-thought implementation by Mozilla.
Like: await in stack trace handler? Are they nuts?

@cspotcode
Copy link

cspotcode commented Aug 30, 2021

@cspotcode/source-map-support uses @cspotcode/source-map-consumer which is a fork of source-map that only has the consumer. @cspotcode/source-map includes the generator, too.

These are based on the latest source-map version. They use WASM and have a sync API.

You might have luck giving them a try. It's all open-source, so of course the changes can be ported over.

@jordanbtucker
Copy link

This will also fix an annoying issue in VS Code.

source-map@<0.7.1 has an invalid typings field in its package.json which is causing VS Code to report an error that it can't find the type declarations. This is fixed in source-map@>=0.7.1.

@SimenB
Copy link
Contributor

SimenB commented Apr 20, 2022

Babel has migrated to https://npmjs.com/package/@jridgewell/trace-mapping, should this module as well? Code change seems fairly trivial (no idea about browser support, but probably?)

@cspotcode
Copy link

cspotcode commented Apr 20, 2022 via email

@SimenB
Copy link
Contributor

SimenB commented Apr 20, 2022

Jest and C8 (via v8-to-istanbul) has also migrated, fwiw

@cspotcode
Copy link

I can migrate @cspotcode/source-map-support as well.

Would be nice to consolidate the ecosystem a bit more.

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

No branches or pull requests

9 participants