I've been running lots of profiles to find the bottlenecks in our webpack build. Probably the biggest bottleneck right now is resolving requests.
To highlight this, I've created a simple test case for our build. Basically I intercepted all calls to Resolver.resolve during a build, and wrote the parameters passed to disk. Then I created a script that loaded the list of requests and used enhanced-resolve to resolve each of the requests, and also used resolve-from.
The results are pretty crazy, for 14850 requests:
enhanced-resolve: 11601 ms
resolve-from: 484 ms
Note that I didn't do much investigation into where this time is going, but I think that this project (and webpack) would benefit greatly from simplifying the architecture.
I'd prefer to see this library only respect an extensions option, and then stuff like custom description files (like bower.json or component.json) could be added via a loader (whose results could be cached). We could add support for browser fields and aliases the same way (cacheable loader).
I've been running lots of profiles to find the bottlenecks in our webpack build. Probably the biggest bottleneck right now is resolving requests.
To highlight this, I've created a simple test case for our build. Basically I intercepted all calls to
Resolver.resolveduring a build, and wrote the parameters passed to disk. Then I created a script that loaded the list of requests and usedenhanced-resolveto resolve each of the requests, and also usedresolve-from.The results are pretty crazy, for 14850 requests:
enhanced-resolve: 11601 msresolve-from: 484 msNote that I didn't do much investigation into where this time is going, but I think that this project (and webpack) would benefit greatly from simplifying the architecture.
I'd prefer to see this library only respect an
extensionsoption, and then stuff like custom description files (like bower.json or component.json) could be added via a loader (whose results could be cached). We could add support for browser fields and aliases the same way (cacheable loader).