Artifacts Associated With Ticket 218859
Ticket change [431a23dd1f] (rid 116488) by nobody on 2000-10-26 01:06:47:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2440 Bug Version: 8.1.1 SubmitDate: '1999-07-23' LastModified: '1999-08-04' Severity: MED Status: Released Submitter: techsupp ChangedBy: stanton RelatedBugIDs: 2447 OS: Windows NT OSVersion: v4.0 SP5 (Also on Win 98) Machine: X86 FixedDate: '1999-08-04' FixedInVersion: 8.2b3 ClosedDate: '2000-10-25' Name: Ingemar Hansson ReproducibleScript: # I'm interested in extracting a file name at the end of a line # The file name may contain white spaces # Generate a string that looks like the one I use (764 chars long) set line {tcc -o x:\xxx\xxx.o } for {set i 0} {$i < 20} {incr i} { append line {-x:\xxx_xxxxxx\xxxxxx\xxx_xx_xxxxx } } append line {z:\zzz_zzzzzz\zzzzzz\zzz_zz_zzzzzzz\zzzzzz.c} # This commands takes long time regexp -- {(?:tcc|tasm) -o .*? (.:.*)} $line "" file # This one is pretty fast regexp -- {(?:tcc|tasm) (-o .*?) (.:.*)} $line "" "" file # This one is also pretty fast regexp -- {(tcc|tasm) -o .*? (.:.*)} $line "" "" file # This one is really fast regexp -- {(tcc|tasm) -o .*? (.:.*)} $line "" "" file ObservedBehavior: The problem seems to be using of non-capturing parenthesis in a regular expression. In the example above "long time" is abour 5 seconds on a 266 MHz Pentium II. "Pretty fast" is about 20 milliseconds and "really fast" is 1 millisecond. In my real case the strings are about 1500 characters long, and then the "long time" is about 50 seconds and "really fast" is about 3 milliseconds. DesiredBehavior: Obviously I want to see "really fast" times in for any regular expression. 07/28/1999 14:46 - stanton - This is a major performance issue with regexp. Henry Spencer is looking into the problem. 08/04/1999 17:45 - stanton - Applied a patch submitted by Henry that significantly improves the performance of these types of expression. - foundin initialized to: "final: 8.1.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "43. Regexp"
- title initialized to:
regexp/regsub operates veeery long on long strings sometimes
- type initialized to: "Bug"
Ticket change [62239b285b] (rid 92364) by welch on 2000-10-26 08:30:14:
- closedate changed to: "2000-10-26T01:30:14"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"