-
Notifications
You must be signed in to change notification settings - Fork 601
Activate preprocessor cache mode by default #1951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
60ac9d0
to
7acecea
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1951 +/- ##
==========================================
+ Coverage 29.99% 30.54% +0.55%
==========================================
Files 51 51
Lines 19153 19191 +38
Branches 9222 9234 +12
==========================================
+ Hits 5744 5861 +117
+ Misses 7961 7761 -200
- Partials 5448 5569 +121 ☔ View full report in Codecov by Sentry. |
3670d25
to
2193a6f
Compare
It looks like there is a test failure only with I have currently no real idea why that happens, and no way of reproducing outside of the CI. I'll have to come back to this later. In the meantime if anyone has an idea, I'd be grateful. |
2193a6f
to
d8a899f
Compare
@glandium do you know what is going on?
|
In the windows logs, this is not good omens:
In the Ubuntu logs, this is not good omens either:
I was able to reproduce locally in a Ubuntu 20.04 chroot, and it seems sccache is stuck during the test... which in fact, is reproducible with unmodified 0.7.1:
With a foreground sccache server, this is what appears in the output:
... for which I'm going to send a PR. |
This is probably not going to help on Windows, though... |
(Note, it would be good to have tests to validate these code paths) |
I'll add this comment here for future work, after seeing the output from --stop-server while debugging the issues with this PR: IIRC ccache shows the number of cache hits that went through direct mode vs. non direct mode, we may want to do that too, rather than only showing that direct mode is enabled. |
d8a899f
to
7a2c59b
Compare
We now get the path that failed to open.
This fixes a ENOENT for when the preprocessor cache tries to read it.
Some compile tests should be run with and without preprocessor cache active. We introduce a new dev dependency that allows us to parametrize tests easily, with no duplication.
Explanations inline.
Preprocessor cache mode (or "direct mode" in ccache speak), offers a measurable improvement for C/C++ caching. A non-scientific test of compiling Firefox on a Ryzen 7950x with hot caches saw this mode changing the wall time from ~48s to ~13s. This is the overall time spent in `mach build` with the only work needed is to recompile all C++. As noted in the docs, this applies only to local storage.
7a2c59b
to
86b1a39
Compare
Thanks for the fixes @glandium :) |
Preprocessor cache mode (or "direct mode" in ccache speak), offers a measurable improvement for C/C++ caching.
A non-scientific test of compiling Firefox on a Ryzen 7950x with hot caches saw this mode changing the wall time from ~48s to ~13s. This is the overall time spent in
mach build
with the only work needed is to recompile all C++, kinda like so:As noted in the docs, this applies only to local storage.