Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Tk question about Ev

by Courage (Parson)
on Jun 09, 2002 at 09:24 UTC ( [id://172897]=note: print w/replies, xml ) Need Help??


in reply to Re: Tk question about Ev
in thread Tk question about Ev

Thank you a lot!
As additional note I want to share my small improvement into Tk.pm module that makes it ~30% faster.
(Ev is usually used in GUI event callbacks, and it's crucial to write code there which executes as fast as possible)
sub Ev { if (@_ == 1) { my $arg = $_[0]; return bless (((ref $arg) ? $arg : \$arg), 'Tk::Ev'); } else { return bless [@_],'Tk::Ev'; } }
I wrote small becnchmark program and can share it and its result as well.

Courage, the Cowardly Dog.

Replies are listed 'Best First'.
Re: Re: Re: Tk question about Ev
by smackdab (Pilgrim) on Jun 09, 2002 at 21:02 UTC
    You should consider posting it to comp.lang.perl.tk
    There are some very good Tk people there
      I did posting to ptk mailing list, and got a reply from Slaven Rezic, he noticed that sub became faster by 20-30%.

      But then after that I did some experiments and realized that 'Ev' sub is usually used in startup and binding time, therefore it is not critical, because it is usually *not* used inside events callbacks.

      Anyway, I keep my slightly faster version of 'sub Ev' in my own VK::TkOverrides package which contain some functions to override from Tk that I think I need to fix :)

      Courage, the Cowardly Dog.
      PS. Something fishy is going on there, or my name is Vadim Konovalov. And it's not.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://172897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-29 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found