-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add a cache to file path mapping #1228
Conversation
This greatly reduces the time needed to resolve FilePathKey objects on watch builds.
Haha - nice visuals! Did you make those by following the debugging instructions here: https://github.com/TypeStrong/ts-loader/blob/master/CONTRIBUTING.md#debugging-ts-loader-installed-from-npm-in-your-own-webpack-project ? Or was it something else? |
I've one naming nit but otherwise this LGTM. Do you want to add an entry to the |
Oh neat, I didn't realize that you had debugging instructions anywhere. I used a combination of |
Yeah I think @andrewbranch put the debug instructions together. Looking at this PR makes me think it would be great to have some perf testing instructions as well... Could you share what your workflow looked like to produce the above? |
Added in #1230 |
Thanks! https://github.com/TypeStrong/ts-loader/releases/tag/v8.0.13 is shipping now. 🚢 |
This greatly reduces the time needed to resolve FilePathKey objects on watch builds. (~20% from 20s to 16s)
Note: The only case where I could see this optimization performing poorly is if a symlink was changed between builds, but I don't believe webpack handles that gracefully anyways.
Relates to #1215
See the performance traces below:
Before:
After: