Menu

need for speed

Help
2008-10-23
2012-10-01
  • Mykhaylo Sorochan

    What are advises to speed up a poet based application? E.g. to avoid some syntactiv forms, initializations; use faster method calls etc.

     
    • Phil Mercurio

      Phil Mercurio - 2008-10-23

      Poet 1.1 was a lot slower, I did some profiling and optimizing around
      1999-2000 but haven't done any since. It's likely that profiling
      using modern tools would uncover some low-hanging fruit that could
      be fixed to get a significant speed-up.

      Another thing that's been suggested is to port Poet to TclOO, which
      is well optimized already.

       
      • Mykhaylo Sorochan

        > Another thing that's been suggested is to port Poet to TclOO, which
        > is well optimized already

        How much efforts needed for that? Can the work be automated? I'm just curious.

         
    • Phil Mercurio

      Phil Mercurio - 2008-10-23

      I don't have many tips for faster Poet. Using autoloading helps,
      since you don't have to load the whole application at once. I
      also mix Poet widgets and Tk/Ttk widgets freely, if it's faster
      to do something in raw Tk and I don't need Poet's slot behavior,
      I just implement it in Tk.

      I often store slot values in local variables rather than repeatedly
      calling "slot" on the same slot. Using "poetvar" is handy but apparently
      actually slower than using "slot", so I only use it when I'm
      going to be getting and setting a slot frequently.

       
      • Mykhaylo Sorochan

        Moving from Poet Tk_Canvas_* objects to raw Tk's increased speed a lot. I would say in times.
        E.g. when there are 50 shapes on the screen and I select them all a lot of handlers/resizers are drawn. Now it takes around a second against several before.

         

Log in to post a comment.