-
15. Re: object pooling detrimental to performance
bill.burke Apr 16, 2004 3:22 PM (in response to bill.burke)This was a single threaded test. Maybe it is different in multithreaded test.
Bill -
16. Re: object pooling detrimental to performance
adrian.brock Apr 16, 2004 3:29 PM (in response to bill.burke)Or if the Object is expensive to construct like a database connection.
-
17. Re: object pooling detrimental to performance
adrian.brock Apr 16, 2004 3:30 PM (in response to bill.burke)Surely MultiThreaded would be worse (more contention)
unless your pooling uses a ThreadLocal pool
I removed all that crap from JBossMQ -
18. Re: object pooling detrimental to performance
bill.burke Apr 16, 2004 3:33 PM (in response to bill.burke)The test I did WAS using ThreadLocal as the pool. Object creation was still faster. Maybe Object creation has a mutex and a multithreaded test would make regular object creation slower than ThreadLocal.
Bill -
19. Re: object pooling detrimental to performance
adrian.brock Apr 16, 2004 4:13 PM (in response to bill.burke)I know yours was Bill.
Steve is interested in it in the context of a global pool:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48594 -
20. Re: object pooling detrimental to performance
spiritualmechanic Apr 16, 2004 10:49 PM (in response to bill.burke)What might be nifty is if the container could attempt to pool a resource. If the container finds that one or the other is significantly faster, it could upgrade it to a JCA, or downgrade it to no-pooling.
1. Get 10 objects using pool
2. Create 10 objects w/o pool
3. Compare the times.
4. AOP as needed if the difference is of a significant enough magnitude. -
21. Re: object pooling detrimental to performance
adrian.brock Apr 17, 2004 6:57 AM (in response to bill.burke)I don't like nifty or cool. It just over complicates things and makes things buggy.
10 is nothing like enought for a test. The JIT doesn't even kick in until you
thousands of repetitions. JITs are bettter at this than you could ever be and
will only get better over time. -
22. Re: object pooling detrimental to performance
spiritualmechanic Apr 17, 2004 7:53 AM (in response to bill.burke)Okay. I'm glad the VM is good at that. Like your JCA FAQ says, "Are you *sure* you want JCA?"
Steve -
23. Re: object pooling detrimental to performance
spiritualmechanic Apr 17, 2004 8:05 AM (in response to bill.burke)It wouldn't even be testing what I thought it'd be testing. I wonder what the real cutoff points are between
1. The VM developer
2. The Container developer
3. The container user (using JSP, other services on top of the container)
Anyways, I'll be quiet about things now :)