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

History Of Ticket 219109ffffffffff

Artifacts Associated With Ticket 219109ffffffffff

  1. Ticket change [0970544aff] (rid 113653) by nobody on 2000-10-26 01:10:55:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 6018 RFE
      Version: 8.3.1
      SubmitDate: '2000-07-18'
      LastModified: '2000-09-26'
      Severity: LOW
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: All
      FixedDate: '2000-09-26'
      FixedInVersion: 8.4a2
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Bob Techentin
      
      
      
      Comments:
      
      It would probably be even more efficient to copy the guts of 
      
          AppendUtfToUtfRep (in tclStringObj.c) but that might be
      
          reaching down to too low a level for this command.  I tried it
      
          and got 75% speedup, but it core dumps in the corner cases in
      
          the test suite.
      
      
      
      DesiredBehavior:
      
      The new [string repeat] command will iteratively call Tcl_AppendToObj() 
      
      to build up a repeating string.  This causes several calls to reallocate more
      
      memory for the result object.  It is more efficient to call Tcl_SetObjLength()
      
      once before the appends, so that it is not necessary to reallocate memory
      
      while building up the string.  This results in about a 20% speedup on my
      
      system, and reduces the chances of the automatic allocator using too much
      
      memory (it doubles the object length each time).
      
      
      
      Patch:
      
      *** tclCmdMZ.c.orig     Mon Jul 17 14:51:48 2000
      
      --- tclCmdMZ.c  Mon Jul 17 15:26:56 2000
      
      ***************
      
      *** 1823,1828 ****
      
      --- 1823,1829 ----
      
        
      
                  string1 = Tcl_GetStringFromObj(objv[2], &length1);
      
                  if (length1 > 0) {
      
      +               Tcl_SetObjLength(resultPtr, count*length1);
      
                      for (index = 0; index < count; index++) {
      
                          Tcl_AppendToObj(resultPtr, string1, length1);
      
                      }
      
      
      
      PatchFiles:
      
      tclCmdMZ.c
      
      
      
      
      
      That simple fix unfortunately doesn't have the desired effect,
      but I've changed around 8.4a2 to use ckalloc directly for the
      same effect. 
      -- 09/26/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.3.1"
    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: "81. Bundled Packages"
    10. title initialized to: "string repeat speedup by pre-allocating TclObj"
    11. type initialized to: "RFE"
  2. Ticket change [abb3b91f67] (rid 101160) by welch on 2000-10-26 08:34:57:

    1. closedate changed to: "2000-10-26T01:34:57"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [8fbd2b4c55] (rid 120322) by dgp on 2001-04-05 08:01:24:

    1. foundin changed to: "None"
    2. status changed to: "Open"
    3. subsystem changed to: "None"
  4. Ticket change [4c073d0892] (rid 126808) by dkf on 2001-06-26 05:50:48:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2001-06-25T22:50:48"
    3. closer changed to: "dkf"
    4. status changed to: "Closed"
    5. subsystem changed to: "18. Commands M-Z"