guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: readlink system calls


From: Maxime Devos
Subject: Re: readlink system calls
Date: Thu, 24 Aug 2023 17:40:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0



Op 22-08-2023 om 21:03 schreef Olivier Dion:
On Tue, 22 Aug 2023, Christopher Baines <mail@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.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]