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

 
 

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

Submitted by:  Ludovic Courtès <civodul>
Submitted on:  Fri 22 Jul 2011 12:35:58 PM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 03 Aug 2011 11:24:19 AM UTCwingoStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1