question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Caching the results of path.relative reduces rebuild times

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Oct 22, 2016

Great work everyone. Released in 13.1.1.

0reactions
ashaffercommented, Apr 14, 2016

Sure, i’ll try to put something together tonight.

Read more comments on GitHub >

github_iconTop Results From Across the Web

persistent cache relative paths · Issue #10400 - GitHub
You can use file caching in CI. Just make sure that the absolute paths are consistent between CI builds. 1
Read more >
Caching Dependencies - CircleCI
Caching is one of the most effective ways to make jobs faster on CircleCI. By reusing the data from previous jobs, you also...
Read more >
Pipeline caching - Azure - Microsoft Learn
Pipeline caching can help reduce build time by allowing the outputs ... Relative file paths or file patterns are resolved against $(System.
Read more >
Caching in GitLab CI/CD
Use artifacts to pass intermediate build results between stages. ... Both artifacts and caches define their paths relative to the project directory, ...
Read more >
Visual Studio retrieving an incorrect path to a project from ...
Deleting the cache directories for VS and TFS. I'm tearing my hair out because I can't recreate the solution as it has near...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found