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
perf: use @jridgewell/sourcemap-codec
#215
Conversation
.eslintrc
Outdated
@@ -31,7 +31,7 @@ | |||
}, | |||
"extends": "eslint:recommended", | |||
"parserOptions": { | |||
"ecmaVersion": 6, | |||
"ecmaVersion": 2020, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node12 supports up to ES2019. But ES2020 is needed to parse import.meta.url
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
For context, @jridgewell is the author of @ampproject/remapping (the best-in-class sourcemap chain flattener), so I trust in this fork's quality of maintenance.
@aleclarson FYI this pull request is waiting to see what happens with #216 (comment). |
42c9c86
to
e68f3e0
Compare
@jridgewell it looks like To others: Should the original |
You're only using the Sourcemaps are essentially a My implementation uses a 16kb Uint8Array buffer. The individual base64 char is placed into the buffer, and when it fills I use a TextDecoder to covert them into a string in one shot. I then start filling the buffer again. This avoids small string concatenations, array expansions, and guarantees the rope optimizations kick in immediately (because 16kb is large enough). |
Yes, I think it should (sorry, dropped the ball on this whole convo, doing some inbox spring-cleaning). The fork has more downloads than the original, and I would wager the vast majority of |
Released 0.27 with this change |
@jridgewell/sourcemap-codec
has better performance and memory footprint thansourcemap-codec
.This PR replaces
sourcemap-codec
with@jridgewell/sourcemap-codec
.before
after