Hi Norbert,

I tried your second suggestion with storing (a reference) to the objects in a Vector.

Just to recap to setup:
- 1000 objects of class A, each storing a Vector containing 10 objects of class B
- Iterate over the 1000 objects (A), for each, calling a method on each of the B's

Case 1:
Store the 1000 objects in a TreeCacheAop
-> Query (from the cache) takes about 2.5 seconds

Case 2:
Store the 1000 objects in a Vector only
-> Query (from the Vector) takes about 20 ms

Case 3:
Store the 1000 objects in a TreeCacheAop and also "add" the object to a Vector
-> Query (from the Vector, ignoring the cache) takes about 2.5 seconds

Why is Case 3 taking so much time (and also about the same time as Case 1)? I don't 
understand the inner workings of the cache, but is it the CacheInterceptor that is 
slowing things down? To me it appears that all operations on the object are being 
routed through the cache version, no matter if I query the cache or the reference in 
my Vector?

Looks like the only way to handle this fast access is to maintain a seperate copy of 
the object?

Can anyone help?

Regards

Ken



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849037#3849037

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849037


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to