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

History Of Ticket 832230ffffffffff

Artifacts Associated With Ticket 832230ffffffffff

  1. Ticket change [df1878985e] (rid 114964) by elfring on 2003-10-29 08:56:09:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The class 
      library "http://java.sun.com/j2se/1.4.2/docs/api/java/ut
      il/regex/Pattern.html" provides a method "compile".
      Can a similar function be offered for TCL?
      How do you think about to make the 
      function "Tcl_RegExpCompile" 
      (http://tcl.tk/man/tcl8.4/TclLib/RegExp.htm) callable 
      on the script level?
      
      I would like to avoid the overhead for pattern 
      preprocessing for the 
      commands "http://tcl.tk/man/tcl8.4/TclCmd/regexp.htm
      " and "http://tcl.tk/man/tcl8.4/TclCmd/regsub.htm" in 
      loops.
      Can we get more performance if the additional memory 
      for the technique "Compile caching" will be saved?
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "elfring"
    9. subsystem initialized to: "43. Regexp"
    10. title initialized to: "Function to compile a pattern"
    11. type initialized to: "RFE"
  2. Ticket change [7638768e7e] (rid 105539) by hobbs on 2003-10-29 16:03:54:

    1. closedate changed to: "2003-10-29T09:03:54"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Tcl already does this if you keep the RE in an object (even a 
      static object as part of a compiled body of code).  IOW, just 
      set the RE to a var, and use that var just as an RE.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "hobbs"
  3. Ticket change [93f7633681] (rid 105900) by elfring on 2003-10-29 16:14:12:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=572001
      
      I assumed that "Compile caching" is performed already.
      But how much processing does it need by TCL? This effort 
      might not be needed for constant patterns that should be 
      compiled only once before the matching is done in a loop.
      
      
    3. login: "elfring"
    4. mimetype: "text/plain"
    5. resolution changed to: "Later"
    6. status changed to: "Open"
    7. username: "elfring"
  4. Ticket change [e59a96e257] (rid 104148) by dkf on 2003-10-29 16:15:26:

    1. assignee changed to: "nobody"
    2. closedate changed to: "2003-10-29T09:15:26"
    3. closer changed to: "dkf"
    4. icomment:
      Logged In: YES 
      user_id=79902
      
      Fleshing out with an example:
      
        set RE {the.*complex.*regexp}
        # Match once against the empty string; this forces compilation
        regexp $RE {}
        # Now use $RE instead of the literal and you'll use the
        # pre-compiled RE.
      
      In fact, there's a few other places which do caching as
      well. But IMHO the biggest advantage of the above technique
      is that you can also give logical names to your RE (e.g.
      $LinkTagMatcher instead {<a[^>]*?HREF="([^"]+)"}) and this
      is a big win in maintenance and code-simplicity terms.
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. username: "dkf"
  5. Ticket change [5d34a41caa] (rid 115417) by elfring on 2003-10-29 16:31:57:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=572001
      
      I'm sorry - I did not know that TCL variables can be marked 
      that an instance contains a compiled regular expression.
      Would you like to publish this behaviour on the 
      page "http://mini.net/tcl/regexp" 
      and "http://mini.net/tcl/2244"?
      
      
    3. login: "elfring"
    4. mimetype: "text/plain"
    5. username: "elfring"
  6. Ticket change [ea98c0c343] (rid 103404) by dkf on 2003-10-29 17:09:57:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      You do it Marcus.  You're obviously much keener on doing
      this than I am especially as virtually everyone's already
      reaping the benefits of precompilation anyway, one way or
      another.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "1 Zero"
    5. username: "dkf"
  7. Ticket change [b917e1f69d] (rid 129071) by elfring on 2003-10-29 18:10:39:

    1. icomment:
      Logged In: YES 
      user_id=572001
      
      I have updated these wikis.
      
      
    2. login: "elfring"
    3. mimetype: "text/plain"
    4. username: "elfring"