On 24 Apr 2001 00:32:40 -0400, Tavin Cole wrote:
> On Mon, Apr 23, 2001 at 11:15:01PM -0500, Owen Williams wrote:
> > On 23 Apr 2001 23:50:01 -0400, Tavin Cole wrote:
> > 
> > > CC'ing this to devl..
> > > 
> > > Folks, apparently we have a problem again with the datastore eating infinite
> > > CPU cycles while doing key searches.  Mark J. Roberts has also confirmed this.
> > > 
> > > It would seem this is related to the new tree-based store, but who knows..
> > > 
> > > -- 
> > > 
> > 
> > well I noticed when I did my development that the wait() commands sucked
> > up oodles of time by calling while(!done){wait();}.  The JVM decided
> > that spending 100% cpu time doing that call was the best way to do
> > things.  by adding a sleep command the CPU usage drops, and there is no
> > noticeable decrease in performance.
> > 
> > while(!done){wait();sleep(1000);}
> 
> Where in the code does this go?
> 
> -- 

this was in dumpBuckets and fillBuckets of the Client classes.

specifically:

try {
     dl.waitEvent();
} catch (InterruptedException e) {}

the listener just does while(!isComplete) wait(); which sucks cycles


owen

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to