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

Cache source map results #104

Open
LarsDenBakker opened this issue Jul 10, 2020 · 3 comments
Open

Cache source map results #104

LarsDenBakker opened this issue Jul 10, 2020 · 3 comments

Comments

@LarsDenBakker
Copy link

When repeatedly calling this library, it looks up the source maps each time. It would be more efficient if the source map information is cached between invocations.

I can work on a PR for that if this is something you are ok with adding.

@bcoe
Copy link
Member

bcoe commented Jul 16, 2020

this seems like it would be a reasonable improvement, I'd be curious to see a benchmark that indicates it's worth doing though, as it introduces some complexity. For instance, annoying edge-cases like colliding source map names.

@SimenB
Copy link
Member

SimenB commented Aug 7, 2020

also how it'd behave if Jest (or something else) is running in watch mode, how would we avoid stale caches?

@LarsDenBakker
Copy link
Author

You can allow the calling library to provide the cache, which would be fresh for each test run.

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

No branches or pull requests

3 participants