Subject: Insufficient high-level caching when grafts are enabled

From: Ludovic Courtès <[email-masked]>
Date: Wed, 08 Apr 2020 13:00:58 +0200

Hello Guix,

--8<---------------cut here---------------start------------->8---
$ GUIX_PROFILING=add-data-to-store-cache guix system build gnu/system/examples/bare-bones.tmpl -d --no-grafts
/gnu/store/w5bsspzdgr55w01fiywir9a8glzlfiph-system.drv

'add-data-to-store' cache:
  lookups:       2289
  hits:           174 (7.6%)
  .drv files:    1314 (57.4%)
  Scheme files:   935 (40.8%)
$ GUIX_PROFILING=add-data-to-store-cache guix system build gnu/system/examples/bare-bones.tmpl -d 
/gnu/store/fg95kb40mmyyl4py5b2238amzzqdy56k-system.drv

'add-data-to-store' cache:
  lookups:       2557
  hits:           360 (14.1%)
  .drv files:    1473 (57.6%)
  Scheme files:  1041 (40.7%)
$ guix describe
Generacio 137   Mar 31 2020 09:13:55    (nuna)
  guix 011f941
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 011f9412795c141ea05fdfa3096ab252252d7080
--8<---------------cut here---------------end--------------->8---

That the ‘add-data-to-store’ hit rate doubles when grafts are enabled
looks fishy.

Ludo’.