Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Investigate whether babel-loader 'cacheCompression: false' can improve performance #1090

Closed
edmorley opened this issue Sep 11, 2018 · 2 comments

Comments

@edmorley
Copy link
Member

edmorley commented Sep 11, 2018

In babel-loader 8.0.2, a new cacheCompression option has been added (babel/babel-loader#574), which can be used to disable the default behaviour of gzip-compressing the babel-loader cache. Disabling the compression resulted in a small performance improvement for that project (at the expense of an increase in disk usage).

I tried locally with Treeherder and saw a 200-300ms improvement in build times (this was with an SSD), with the cache size on disk increasing from 0.7MB to 2.5MB. We should try with a few different projects, and also in CI (where I/O is likely slower) to confirm that disabling it is generally a performance win.

@edmorley
Copy link
Member Author

CRA now disables it during development (only):
facebook/create-react-app#5053

@edmorley edmorley added this to the v9 milestone Sep 27, 2018
@edmorley edmorley removed this from the v9 milestone Oct 10, 2018
@edmorley
Copy link
Member Author

Without knowing users disk and/or CPU speeds, it seems like it will be hard for us to pick a suitable value for all use-cases here. As such I think it might be best to just stick with the babel-loader default (particularly since webpack 5's new cache probably makes this redundant).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant