Is JCS slow ?

2004-01-20 Thread Spaggiari, Jean-Marc
Hi all. Sorry if it's a question that you have always see, but i'm not able to look at the archives ... I'm using JCS in an application where i need to look 1600 time on the cache in a loop. The cache is empty at this time. For loop take about 160 seconds. Using hashtable instead of JCS take a

RE: Is JCS slow ?

2004-01-20 Thread Aaron Smuts
No, no one has ever asked if JCS is slow. Something is definitely wrong. The cache is not significantly slower than a hashtable. Can you give more details about your configuration (i.e. the cache.ccf file) and what you are caching. > -Original Message- > From: Spaggiari, Jean-Marc [ma

RE: Is JCS slow ?

2004-01-20 Thread Spaggiari, Jean-Marc
I am caching String (key) for Vector (value) ... But I found somethings. Y have a disk cache. By disable it, I can improved my speed when cache is empty. But if I fill cache with 1600 items, it take about 1 min for looking for 100 items inside :( Here is my cache.cff file, the code follow ... I'

RE: Is JCS slow ?

2004-01-20 Thread Aaron Smuts
I'm not sure what is going on. Are you getting any errors in the logs? Your test will be off if you call the slow Date(), over and over again in System.out.println (new Date ()); You should use the system currenttimemillis. Alos, you might want to use an ArrayList rather than a vector here.

Re: Is JCS slow ?

2004-01-20 Thread James Taylor
It looks like your memory caches are bounded at 1000 items (MaxObjects = 1000). Thus if you put 1600 items in the cache, and then look for any of the first 600 items, the cache will need to read them from disk, which takes time. On Jan 20, 2004, at 3:14 PM, Spaggiari, Jean-Marc wrote: I am

RE: Is JCS slow ?

2004-01-20 Thread Spaggiari, Jean-Marc
but DC is not used in my cache.cff file ... It's only here for remind, but I have jxs.default= with nothing else ... I'm applying the Aaron suggestion ... Wait a minute for the result ... -Original Message- From: James Taylor [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 4:02

RE: Is JCS slow ?

2004-01-20 Thread Spaggiari, Jean-Marc
I have no message in log. I going 2 time in this method. First time the cache is empty and i'm comming with 1600 element, wich was stored un the cache, and the second time with 5500 elements. It's the second time the slowest one (1m/100 elements). I have the tmp file with (about 4Mo). Here is my

Re: Is JCS slow ?

2004-01-20 Thread James Taylor
But I have 8 line in log for each element read : Maybe it's comming from here ? How can I disable the log ? Is it maybe JBoss who activate this ? Oh my yes, 8 lines of output per element will slow things down plenty. You need to turn the log4j log level for the jcs classes up to INFO or WARN. Ye

Re: Is JCS slow ?

2004-01-20 Thread Shamir Karkal
The log4j configuration in JBoss can be done at $JBOSS_HOME/server//config/log4j.xml , for most of the jboss 3.x series. If you are using some other profile rather than "default", replace accordingly in above. Regards S H A M I R Development Gateway Washington DC Ph : 1-202-473-4147 James Tayl

Re: Is JCS slow ?

2004-01-20 Thread Spaggiari, Jean-Marc
I have do many thinks. In log4j.xml : So, no more loging in file. (I have look on the file, and there is nothing) In my class : try { JCS cache = JCS.getInstance("Test"); System.out.println ("Before test"); c

Re: Is JCS slow ?

2004-01-20 Thread Spaggiari, Jean-Marc
Running the same test as standalone in a main : Avant le test Tue Jan 20 18:47:30 EST 2004 Tue Jan 20 18:47:30 EST 2004 Tue Jan 20 18:47:30 EST 2004 Apres le test :((( Now it's sure, it come from JBoss, but why and where ? :( -