Open Bug 911640 Opened 11 years ago Updated 2 years ago

mach should warn if using ccache but the cache size is small

Categories

(Firefox Build System :: Mach Core, enhancement)

All
macOS
enhancement

Tracking

(Not tracked)

People

(Reporter: heycam, Unassigned)

Details

I realised from IRC chatter that when I last tried ccache on this machine and dismissed it due to a lack of build time improvements, it was using the default cache size of 1 GB.  Upping that to 8 GB actually made ccache useful.

I suggest mach should warn if you have --enable-ccache and your cache size is obviously too low.
Note that if the user has CCACHE_COMPRESS set, a smaller cache might still be effective.
The default ccache size of 1 GB is silly and isn't reflective of modern hard drive sizes. I'd feel comfortable with a feature that warns about small ccache sizes, regardless of CCACHE_COMPRESS.

If you want to bloat scope a bit, we can borrow a page from what releng does during builds and have the build system grab the state of |ccache -s| before and after the build and compare results. We can use that data to drive user warnings.

I'd dump this code into python/mozbuild/mozbuild/controller/building.py and then hook it up in python/mozbuild/mozbuild/mach_commands.py inside def build().
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.