bugGuile - Bugs: bug #33815, `canonicalize-path' leads...

 
 

bug #33815: `canonicalize-path' leads `primitive-load' to stat like crazy [2.0.2]

Submitter:  Ludovic Courtès <civodul>
Submitted:  Fri 22 Jul 2011 12:35:58 PM UTC
 
Category:  None Severity:  4 - Important
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Fri 22 Jul 2011 12:35:58 PM UTC, original submission:  

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'.

Ludovic Courtès <civodul>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wingo (Updated the item)
  • -email is unavailable- added by civodul (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-03 wingo StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9