-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Caching the results of path.relative reduces rebuild times #1543
Comments
I love when 🔍 happens 😄 . Other than removing the repeated relative lookups entirely, I don't see why we wouldn't want to cache these. I can see a problem is a symlink changes, but Browserify doesn't have a great record with those already. 😞 Where would this make the most impact in your builds? Here in browserify, or in one of the dependencies? |
The big ones seem to be here in browserify and in module-deps. And ya, devtool is pretty awesome for this sort of profiling. |
PR? 😀 |
Sure, i'll try to put something together tonight. |
Great work everyone. Released in 13.1.1. |
I did a bit of profiling with devtool and noticed that a bunch of time is spent in
path.relative
during rebuilds, for the most part repeating path resolutions that have already been done.Memoizing it's results decreases my rebuild times by about 10%. I made a little module for shimming path.relative to make this happen, cached-path-relative. But maybe it'd be best to have browserify and its dependencies use this or something like it explicitly?
The text was updated successfully, but these errors were encountered: