Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f6ea7920765db0b7bf370459913d9672951c2d40
Ticket: 687906ffffffffffffffffffffffffffffffffff
tclPkgUnknown performance enhancement
User & Date: jenglish on 2003-02-21 08:51:00
Changes

  1. assignee changed to: "dgp"
  2. icomment:
    Logged In: YES 
    user_id=68433
    
    Looks good.
    
    As discussed on the chat, you can save some stat() calls by
    omitting both calls to [file readable $file], since
    unreadable pkgIndex.tcl files are handled by the subsequent
    "[catch {source $file} ...]", at the cost of a minor change
    in semantics (unreadable pkgIndex files would log error
    messages, which they do not at present.)
    
    The test for list equality (~line 516) could use a comment;
    it's not immediately obvious from the code what's going on.
    
    Another way of testing for list equality just occurred to me:
    
    # Check if $auto_path has changed:
    set equal [expr {[llength $old_path] == [llength $auto_path]}]
    if {$equal} {
        foreach e1 $old_path e2 $auto_path {
            if {[string compare $e1 $e2]} {
                set equal 0
                break
            }
        }
    }
    
    Anyway, back to DGP.  This looks comittable.
    
    
  3. login: "jenglish"
  4. mimetype: "text/plain"
  5. username: "jenglish"