Hi! Ludovic Courtès <l...@gnu.org> skribis:
> I’ve made progress identifying and mitigating what seems to be the main > cause of this (the fact that it’s possible to ungexp a list and that > list will be scanned in its entirety in search of file-like > objects—convenient but expensive) but as you can see, there’s still a > lot to do. I cherry-picked to ‘master’ the gexp optimizations I made on ‘wip-build-systems-gexp’. The good news is that it pays off on system compilations, going from (commit 3c548c3e0eade12d3e86b1201dbd95863ca64ea7): --8<---------------cut here---------------start------------->8--- $ GUIX_PROFILING="gc object-cache" ./pre-inst-env guix system build -d --no-grafts gnu/system/examples/desktop.tmpl /gnu/store/g6kd2blajq6yja80516m85zv07d4ysb3-system.drv Store object cache: fresh caches: 2 lookups: 119282 hits: 116225 (97.4%) Garbage collection statistics: heap size: 119.43 MiB allocated: 649.07 MiB GC times: 26 time spent in GC: 2.15 seconds (37% of user time) --8<---------------cut here---------------end--------------->8--- to (commit 0a912b3a434c9ff9515f9036feae4d3a7075fb2f): --8<---------------cut here---------------start------------->8--- $ GUIX_PROFILING="gc object-cache" ./pre-inst-env guix system build -d --no-grafts gnu/system/examples/desktop.tmpl /gnu/store/f63c8rk8rwrfr5cl4s74hnx25l3z1hrp-system.drv Store object cache: fresh caches: 2 lookups: 119285 hits: 116227 (97.4%) cache size: 3058 entries Garbage collection statistics: heap size: 111.43 MiB allocated: 608.01 MiB GC times: 25 time spent in GC: 2.00 seconds (37% of user time) --8<---------------cut here---------------end--------------->8--- Reduced heap allocations (-6%), reduce heap size (-7%), and reduced run time (ditto). Getting better! Ludo’.