Skip to content
Tcl Source Code History Of Ticket 218487ffffffffff
Login

History Of Ticket 218487ffffffffff

Artifacts Associated With Ticket 218487ffffffffff

  1. Ticket change [f65582416a] (rid 130288) by nobody on 2000-10-26 01:01:09:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 702 Bug
      Version: 8.0.3
      SubmitDate: '1998-10-09'
      LastModified: '2000-02-05'
      Severity: SER
      Status: Released
      Submitter: admin
      ChangedBy: hobbs
      OS: All
      OSVersion: NA
      Machine: NA
      FixedDate: '2000-02-05'
      FixedInVersion: 8.2
      ClosedDate: '2000-10-25'
      
      
      I have done some further testing related to this performance problem.
      
      I have attempted to remove code and narrow down the problem - so far I have
      disconvered that one procedure in particular is taking ages (like 10-20
      times than before):
      See below... proc get_raw_token
      
      I have also downloaded the source release and compiled this on my Linux box,
      running the same application it is also extremely slow compared to the 8.0p2
      release!
      
      # include special handling for tokens and separators
      # if processing ALPHA then get separator -> end of token
      # if processing NUMBER then get separator -> end of token
      # if processing SEPARATOR then test for next char?? only <= >= <> != ??
      # note: this processing is handled semi-automatically by "string
      wordstart/end"
      
      proc get_raw_token {} {
          global file_source file_source_pos file_source_line
      
          while 1 {
       set start [string wordstart $file_source $file_source_pos]
       set end [expr {[string wordend $file_source $file_source_pos] - 1}]
      
       # null? assume end of file
       if {$end < $file_source_pos} { return "//eof" }
      
       set file_source_pos [expr {$end + 1}]
       set token [string range $file_source $start $end]
      
       # comments? search until end of the line
       if {$token == "/"} {
           if {[string range $file_source $file_source_pos $file_source_pos] ==
      "/"} {
        while {[string range $file_source $file_source_pos $file_source_pos] >= "
      "} {
            incr file_source_pos
        }
           }
       } elseif {$token == "'"} {
           while {[string range $file_source $file_source_pos $file_source_pos] !=
      "'"} {
        incr file_source_pos
           }
           # skip final quote character
           set end $file_source_pos
           incr file_source_pos
           # return string, including quote characters
           return [string range $file_source $start $end]
       } elseif {$token == "\""} {
           while {[string range $file_source $file_source_pos $file_source_pos] !=
      "\""} {
        incr file_source_pos
           }
           # skip final quote character
           set end $file_source_pos
           incr file_source_pos
           # return string, including quote characters
           return [string range $file_source $start $end]
       } elseif {$token == "\n"} { incr file_source_line
       } elseif {$token > " "} { return $token }
          }
      }
      
      Peter Campbell wrote:
      
      > I have upgraded from Tcl8.0p2 on Win95 to 8.0.3 - downloaded the binary
      > distribution for both.
      >
      > My application which is a compiler/translator now runs 10-20 times
      > slower than before.
      >
      > I had also run my application on Linux using Tcl7.6 and on Linux using
      > itcl3.0a1 with Tcl8.0. The performance was good, I have not yet tried my
      > application on Linux using the new Tcl8.0.3.
      >
      > Has anybody else experienced any performance problems?
      > I have reported this problem to Scriptics as it also effected their
      > "prowish" program.
      >
      > Does anyone involved with the source code of Tcl know what has changed
      > to effect performance to this extreme from 8.0p2 to 8.0.3?
      >
      > I thought it may be to do with source files being re-"compiled"
      > constantly or something??
      > I do not use any extensions as yet, the program uses file access -
      > mainly reading small (5-10k) files into a string then processing them
      > using the string commands.
      >
      > HELP...
      
      
      The problem was due to an optimization that was removed because it
      wasn't 100% correct, which was later reinstated with full correctness
      (at least in 8.2, may be earlier).  All the user has to do is:
      
          while {1}
      
      instead of
      
          while 1
      
      to get the speed back.  This is pedantically correct, but as I said,
      the optimization was also reinstated later.  The algorithm itself
      could be significantly improved. 
      -- 02/05/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.0.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to:
      tcl8.0p2 is 10x faster than tcl8.0.3:  performance bug when 
      
    11. type initialized to: "Bug"
  2. Ticket change [23abd58c11] (rid 130979) by welch on 2000-10-26 08:23:17:

    1. closedate changed to: "2000-10-26T01:23:17"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"