Skip to content

Caching the results of path.relative reduces rebuild times #1543

Closed
@ashaffer

Description

@ashaffer

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions