From: Maxime Devos <maximedevos@telenet.be>
To: Olivier Dion <olivier.dion@polymtl.ca>,
Christopher Baines <mail@cbaines.net>,
Guile User <guile-user@gnu.org>
Subject: Re: readlink system calls
Date: Thu, 24 Aug 2023 17:40:56 +0200 [thread overview]
Message-ID: <5ec995b5-38e3-1bd5-7c89-0c415035e4da@telenet.be> (raw)
In-Reply-To: <87pm3evqzr.fsf@laura>
[-- Attachment #1.1.1: Type: text/plain, Size: 1239 bytes --]
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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
prev parent reply other threads:[~2023-08-24 15:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 16:22 readlink system calls Christopher Baines
2023-08-22 19:03 ` Olivier Dion
2023-08-24 15:40 ` Maxime Devos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ec995b5-38e3-1bd5-7c89-0c415035e4da@telenet.be \
--to=maximedevos@telenet.be \
--cc=guile-user@gnu.org \
--cc=mail@cbaines.net \
--cc=olivier.dion@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).