Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Massive performance improvements #71

Merged
merged 3 commits into from
Mar 13, 2018
Merged

Conversation

mourner
Copy link
Contributor

@mourner mourner commented Mar 13, 2018

Rewrote decoding with a streaming version that processes the mapping character by character (without creating intermediate arrays). On a big source map sample (GL JS), it's 2.6x faster than the current implementation (down from 59ms to 22ms), with smaller memory footprint.

Stand by while I'm working on optimizing encoding as well.

The only caveat is that I'd need to remove the vlq dependency to be able to inline it optimally.

@Rich-Harris are you OK with this direction?

@Rich-Harris
Copy link
Owner

Definitely! 😍

@mourner
Copy link
Contributor Author

mourner commented Mar 13, 2018

@Rich-Harris this is ready for review. Encoding is only ~20-30% faster. 😭

@Rich-Harris Rich-Harris merged commit 7896ddc into Rich-Harris:master Mar 13, 2018
@Rich-Harris
Copy link
Owner

Encoding is only ~20-30% faster

I'll take it!

Thanks so much, this LGTM — have released 1.4.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants