Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Thread::Apartment, how do I use main:: subs?

by wilsond (Scribe)
on May 20, 2009 at 00:35 UTC ( #765078=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Thread::Apartment, how do I use main:: subs?
in thread Thread::Apartment, how do I use main:: subs?

By the way, the "workaround" I've presented above is terribly inefficient. My app is running at 400MB right now and it hardly does more than load. Memory leak anyone? It's beyond time for me to be digging myself out of that leak. *whee*


I'm a Linux user. You wouldn't know it since I mostly ask Windows questions. Whee.
If you want to do evil, science provides the most powerful weapons to do evil; but equally, if you want to do good, science puts into your hands the most powerful tools to do so.
- Richard Dawkins


Comment on Re^3: Thread::Apartment, how do I use main:: subs?
Re^4: Thread::Apartment, how do I use main:: subs?
by BrowserUk (Pope) on May 20, 2009 at 01:07 UTC
    My app is running at 400MB right now and it hardly does more than load.

    I found the same thing when I played with T::A a year or two ago. Huge memory usage and glacial speed for relatively little gain.

    In my experience, nearly everything you want to do with threads is easier, lighter and faster using threads directly. So long as you're not wedded to everything being OO, there is rarely a genuine need to pass complex objects around between threads.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^4: Thread::Apartment, how do I use main:: subs?
by wilsond (Scribe) on May 26, 2009 at 20:09 UTC

    It wasn't a memory leak. I told it to make a pool of 30 threads at startup. 30 * too much memory = way too much memory. I have it down to 90MB right now, but that is still very, very high. Lots of tweaking to go.


    I'm a Linux user. You wouldn't know it since I mostly ask Windows questions. Whee.
    If you want to do evil, science provides the most powerful weapons to do evil; but equally, if you want to do good, science puts into your hands the most powerful tools to do so.
    - Richard Dawkins

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-11-28 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls