You are.. quick!;-)

Thanks for your input, yet again. I get roughly the same CPU usage on your sample scripts; Admittably my pTk test script had a somewhat complex callback.

I guess I'll just be very careful about what I do in motion callbacks. (zinc-demo scripts show this to some extent on my system; clipping=25%, MagicLens=90%, testGraphics=40-50%, curve_bezier=25% etc). Notable exception is window-contours, I have yet to figure out why.

Also that fix for centering the model( discussed previously ) is doing a complex calculation during drags. Try without the transform and see if it reduces cpu.

Actually I was referring to simple test scripts with just the translate() and no transform() (except the POE+Zinc 90% which was the application you know). The transform() by the way is very simple extrapolation, considering it's written in C it should be lightning fast. I'll test it though, trivial to write in assembler if it turns out to be a problem area (having never tested Inline::ASM, - how does that perform?)..

I have concluded to remove POE for the next rewrite, as it adds overhead and confusion. I plan on learning about bless() and isolating my code properly in modules instead of poe states, but I have some reading and experiments to do ;-)

Even though the hollywood studios have rack power, a modern GPU should chew these effects easily.. But I guess i'll write it off on the account of perl flexibility;(

btw, I compiled 5.10 from source, no noticable difference.


In reply to Re^2: Tk/Zinc mouse drag performance issues? by rocklee
in thread Tk/Zinc mouse drag performance issues? by rocklee

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.