* [bug #33815] `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2]
@ 2011-07-22 12:36 Ludovic Courtès
2011-08-03 9:47 ` Andy Wingo
2011-08-03 11:24 ` Andy Wingo
0 siblings, 2 replies; 3+ messages in thread
From: Ludovic Courtès @ 2011-07-22 12:36 UTC (permalink / raw)
To: Ludovic Courtès, bug-guile
URL:
<http://savannah.gnu.org/bugs/?33815>
Summary: `canonicalize-path' leads `primitive-load' to stat
like crazy [2.0.2]
Project: Guile
Submitted by: civodul
Submitted on: Fri 22 Jul 2011 12:35:58 PM GMT
Category: None
Severity: 4 - Important
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hello,
#v+
$ unset GUILE_LOAD_PATH
$ unset GUILE_LOAD_COMPILED_PATH
$ strace -e lstat,stat guile -c 1
[...]
stat("/home/ludo/soft/share/guile/2.0/ice-9/eval.scm", {st_mode=S_IFREG|0644,
st_size=18985, ...}) = 0
stat("/home/ludo/soft/lib/guile/2.0/ccache/ice-9/eval.go",
{st_mode=S_IFREG|0644, st_size=11929, ...}) = 0
stat("/home/ludo/soft/share/guile/2.0/ice-9/eval.scm", {st_mode=S_IFREG|0644,
st_size=18985, ...}) = 0
stat("/home/ludo/soft/lib/guile/2.0/ccache/ice-9/eval.go",
{st_mode=S_IFREG|0644, st_size=11929, ...}) = 0
stat("/home/ludo/soft/share/guile/2.0/init.scm", 0x7fffe6ef5630) = -1 ENOENT
(No such file or directory)
stat("/home/ludo/soft/share/guile/site/2.0/init.scm", 0x7fffe6ef5630) = -1
ENOENT (No such file or directory)
stat("/home/ludo/soft/share/guile/site/init.scm", 0x7fffe6ef5630) = -1 ENOENT
(No such file or directory)
stat("/home/ludo/soft/share/guile/init.scm", 0x7fffe6ef5630) = -1 ENOENT (No
such file or directory)
stat("/home/ludo/soft/share/guile/2.0/ice-9/boot-9.scm",
{st_mode=S_IFREG|0644, st_size=131349, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/ludo", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat("/home/ludo/soft", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/ludo/soft/share", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/ludo/soft/share/guile", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
lstat("/home/ludo/soft/share/guile/2.0", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
lstat("/home/ludo/soft/share/guile/2.0/ice-9", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
lstat("/home/ludo/soft/share/guile/2.0/ice-9/boot-9.scm",
{st_mode=S_IFREG|0644, st_size=131349, ...}) = 0
stat("/home/ludo/soft/lib/guile/2.0/ccache/ice-9/boot-9.go",
{st_mode=S_IFREG|0644, st_size=227749, ...}) = 0
stat("/home/ludo/soft/share/guile/2.0/ice-9/boot-9.scm",
{st_mode=S_IFREG|0644, st_size=131349, ...}) = 0
stat("/home/ludo/soft/lib/guile/2.0/ccache/ice-9/boot-9.go",
{st_mode=S_IFREG|0644, st_size=227749, ...}) = 0
#v-
For ice-9/eval.{scm,go}, everything is as expected. However, for
ice-9/boot-9.{scm,go} and all subsequent files, each tree component is stat'd,
due to the use of `canonicalize_path'.
This may be necessary for user's files and cache, but at perhaps we could
remove the `canonicalize_path' call for anything under
$libdir/share/guile/2.0, or cache the result somehow (memoizing in
`scm_canonicalize_path'?).
Ludo'.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33815>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug #33815] `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2]
2011-07-22 12:36 [bug #33815] `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2] Ludovic Courtès
@ 2011-08-03 9:47 ` Andy Wingo
2011-08-03 11:24 ` Andy Wingo
1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2011-08-03 9:47 UTC (permalink / raw)
To: Ludovic Courtès, bug-guile
Hi,
On Fri 22 Jul 2011 14:36, Ludovic Courtès <INVALID.NOREPLY@gnu.org> writes:
> For ice-9/eval.{scm,go}, everything is as expected. However, for
> ice-9/boot-9.{scm,go} and all subsequent files, each tree component is stat'd,
> due to the use of `canonicalize_path'.
>
> This may be necessary for user's files and cache, but at perhaps we could
> remove the `canonicalize_path' call for anything under
> $libdir/share/guile/2.0, or cache the result somehow (memoizing in
> `scm_canonicalize_path'?).
Fixed, I believe. Good catch!
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug #33815] `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2]
2011-07-22 12:36 [bug #33815] `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2] Ludovic Courtès
2011-08-03 9:47 ` Andy Wingo
@ 2011-08-03 11:24 ` Andy Wingo
1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2011-08-03 11:24 UTC (permalink / raw)
To: Ludovic Courtès, Andy Wingo, bug-guile
Update of bug #33815 (project guile):
Status: None => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33815>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-03 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 12:36 [bug #33815] `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2] Ludovic Courtès
2011-08-03 9:47 ` Andy Wingo
2011-08-03 11:24 ` Andy Wingo
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).