Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ea6ee2d74366e64da0acebbb8037411de6ba4b90
Ticket: 871583ffffffffffffffffffffffffffffffffff
filesystem optimization, committed jan 2004
User & Date: vincentdarley on 2004-01-15 03:13:13
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    "yes" to your question below.  Note that the "path" object
    results of 'glob' can be different to a normal path:
    
    glob -dir $dir *
    
    returns special path objects which know that they are '$dir'
    plus a little bit.  It could be there is a slowdown just for
    these special paths.  (We should add a separate 'file
    dirname' benchmark on an ordinary path).
    
    However: I really don't know what would be slower with this
    patch (unless it introduces some subtle weirdness I haven't
    thought about).  Here's what this patch does:
    
    Tcl 8.4/8.5: spend lots of time with relative paths checking
    if the 'cwd' has changed.  This involved calling the OS'es
    getcwd, converting the encoding, normalizing, creating a
    path object, comparing with the previous path object, and
    then usually throwing it all away because no-one had called
    chdir behind our backs to change the cwd anyway.
    
    Tcl 8.5+patch: cache the native cwd and perform an immediate
    comparison of the result of getcwd with that native cwd. If
    it's the same, return the cached value which then
    short-circuits everything else (no normalization, no
    encoding conversion, no object being created).
    
    There are a few other small changes beyond the above, which
    could be to blame (some code paths have changed in
    tclPathName, which helps to simplify everything, I think!).
    
    Thanks for doing all this, and for pointing out the code
    duplication -- I'll look into that, probably after we
    understand this issue, since fixing this might lead
    naturally do removing the duplication anyway...
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"