[bug #65533] gmake-4.4.1 has a performance regression: at least the nwchem project now builds much slower
"Paul D. Smith" <[email protected]> Tue, 20 Jan 2026 14:16:35 -0500 (EST)
| Newsgroups | gmane.comp.gnu.make.bugs |
|---|---|
| Message-ID | <[email protected]> |
Follow-up Comment #14, bug #65533 (group make):
Interesting. If you wanted to check if this is the cause of the slowdown, you
can edit the *src/dir.c* file and change these lines:
/* No commands have run since we parsed this directory so it's good.
*/
if (ctr == command_count)
return dir;
to just return the dir, like this:
/* No commands have run since we parsed this directory so it's good.
*/
return dir;
If that fixes the performance problem then we've discovered the culprit.
The cache should only be invalidated when both (a) make is trying to access a
directory that it already accessed before (so it was cached), AND (b) make has
invoked some command (either a recipe or a $(shell ...) function) since the
last time it wanted to access that directory.
If this does end up being the problem then we'll need to dig deeper. Having
almost 4 million instances of directory cache invalidation sure seems odd;
presumably you're not building 4 million targets / running 4 million recipes,
so maybe there is a $(shell ...) function which is getting run constantly?
Maybe you can examine the debug output and look at what make is doing, in
between these cache invalidations?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65533>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaW/UkwAKCRCqLAuaBUf3 Tj60AQC51xmt8suq8vLv2OUkW+2N5py+/hQsrz5fsyeToCmOiAEApcBRsMYvQ1UO hAG/w1OJ21C9YmlMkVYALRSt0uZFugE= =dfKS -----END PGP SIGNATURE-----