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 resulting require paths to speed up module resolution #5

Open
airhorns opened this issue Jan 23, 2021 · 0 comments
Open

Cache resulting require paths to speed up module resolution #5

airhorns opened this issue Jan 23, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@airhorns
Copy link
Contributor

Like bootsnap for ruby or https://github.com/bahmutov/cache-require-paths, we can make module name => file resolution go faster by injecting the map ahead of time into the managed process. Not exactly sure the fastest way to do this, but both TypeScript and esbuild know how to do this resolution ahead of time, so we may be able to do it one pass all ahead of time.

Alternatively and less desirably we could just cache the resolved path on the first run and re-use it when in --watch, but that doesn't improve first boot time which I'd like to do.

@airhorns airhorns added the enhancement New feature or request label Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant