Skip to content
Tcl Source Code History Of Ticket 1552883
Login

History Of Ticket 1552883

Artifacts Associated With Ticket 1552883

  1. Ticket change [d5c9208109] (rid 123693) by dgp on 2006-09-05 18:15:28:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Want [dict] expertise to
      weigh in on this.  Considering
      replacing:
      
        foreach {src dist} $pairs {
          dict set Msgs $locale $ns $src $dest
        }
      
      with:
      
        dict set Msgs $locale $ns \
            [dict replace \
            [dict get $Msgs $locale $ns] \
            {expand}$pairs]
      
      Any advice on whether that should
      be expected to be an improvement?
      Any need for [K]?
      
      (Note that the use of {expand} will
      force direct evaluation - no bytecode)
      
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dgp"
    10. subsystem initialized to: "30. msgcat Package"
    11. title initialized to: "msgcat [dict] usage"
    12. type initialized to: "RFE"
  2. Ticket change [54c9d7b959] (rid 94009) by dkf on 2006-09-07 17:28:37:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      Is loading a message catalog a bottleneck? If not, anything
      will do if it works.
      
      Another suggested version:
      
        dict update Msgs $locale locale {
           dict update locale $ns map {
              set map [dict replace $map {expand}$pairs]
           }
        }
      
      If performance is critical, measure the alternatives and use
      the best one ([dict replace] is not bytecode compiled
      anyway, and all other dict subcommands mentioned are.)
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  3. Ticket change [fa63d83e5b] (rid 91863) by dgp on 2006-09-08 02:48:09:

    1. closedate changed to: "2006-09-07T19:48:09"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Looking into this some more,
      it appears the original is
      really best.  Whatever one
      might save pushing the
      [foreach] from Tcl into C,
      one is certain to lose in
      all the additional copying
      of shared Tcl_Obj's that
      [dict replace] and [dict update]
      will require.  The original
      appears to do a true update
      in place.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "dgp"
  4. Ticket change [9be916befb] (rid 111199) by dkf on 2006-09-08 02:57:45:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      While it is possible to do things to make the code more
      efficient (รก la [K]) I don't recommend it if there is no
      clear performance gain, as they are messy and surprisingly
      hard to maintain. Simple is Good!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"