Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 32b72cbcb7f7dbfd2bb28d4da2d242ad0fd38d67
Ticket: 1452969fffffffffffffffffffffffffffffffff
performance: regexp 20sec delay from 8.0 to 8.3
User & Date: msofer on 2006-03-18 20:50:30
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    Oops: [string last], not [string first]. Still much faster:
    % time {
        if {[set n [string last = $sEnvPair]] != -1} {
            set sEnvName [string range $sEnvPair 0 [expr {$n-1}]]
            set sEnvValue [string range $sEnvPair [incr n] end]
        }
    } 1000
    1040.019 microseconds per iteration
    
    Just by looking at your snippet of code, I'm guessing that
    you want [string first], and that your regexp is wrong as it
    will produce the wrong results if anybody has an '=' in his
    name. 
    
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"