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
- 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. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"