Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Perl/Tk and threads on Win32

by ldln (Pilgrim)
on Oct 27, 2006 at 18:08 UTC ( [id://580975]=note: print w/replies, xml ) Need Help??


in reply to Perl/Tk and threads on Win32

My 2cents (before the experts come along) is that it works well. The thing, in addition to starting any threads before doing any work with Tk, is to start the threads as early as possible with "use" (compile time) and then "require" (runtime) as much as possible of the other modules needed, so that the stuff copied into the other "worker" threads is as minimal as possible.

For instance by using "use Tk;" instead of "require Tk;" we clearly see that lot of extra Tk stuff is copied into the new threads by looking at mem usage in task manager.

use Tk; mem usage perl.exe: 24MB/21MB (phys/virtual) require Tk; mem usage perl.exe: 12MB/9MB (phys/virtual)
(7 threads were created in this example.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found