Op 22-08-2023 om 21:03 schreef Olivier Dion:
On Tue, 22 Aug 2023, Christopher Baines <m...@cbaines.net> wrote:When looking at strace for various Guile things, I'm seeing a lot of readlink system calls for directories in the load path, e.g.Is this not more a side effect of using Guix (the GNU store) than Guile itself?
I'm pretty sure that, store or not, there is probably not a good reason Guile is 'readlink'-ing the same directories multiple times. Even if it were a side effect of using Guix, it appears to be something that needs to be addressed in Guile.
Any idea what leads to this behaviour?
Hypothesis: * Guile is searching for .go/.scm files in the load paths * as part of that this process, it readlinks stuff (don't know why Guile would need this information though) * it doesn't cache any of this readlink information, so if you load N .go/.scm files from the same directory, then the number of readlink calls is multiplied by N.Assuming this hypothesis true, a potential solution could be to cache the readlink information. Whether that's a correct solution depends on what the purpose of these readlink calls are ...
Best regards, Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature