On Monday 07 July 2008 09:49, Matthew Toseland wrote:
> On Mon, Jul 07, 2008 at 12:52:59PM +0800, Daniel Cheng wrote:
> > On Fri, Jul 4, 2008 at 10:28 PM,  <toad at freenetproject.org> wrote:
> > > Author: toad
> > > Date: 2008-07-04 14:28:59 +0000 (Fri, 04 Jul 2008)
> > > New Revision: 20993
> > >
> > > Added:
> > >   branches/db4o/freenet/src/freenet/client/async/PendingKeyItem.java
> > > Modified:
> > >   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
> > >   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
> > >   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerNonPersistent.java
> > >   branches/db4o/freenet/src/freenet/node/Node.java
> > > Log:
> > > Implement pendingKeys differently for transient vs persistent.
> > > For transient, keep the existing Map-based code.
> > > For persistent, use PendingKeyItem's and queries.
> > > Hopefully this is a speedup.
> > >
> > [...]
> > > +
> > > +               ObjectSet pending = container.query(new Predicate() {
> > > +                       public boolean match(PendingKeyItem item) {
> > > +                               if(!key.equals(item.key)) return false;
> > 
> > ob4o does not seems to be using the index for key.equals here.
> > I have misinformed you something about indexing....
> 
> Yikes.... :(
> 
> What to do about it? Can db4o index byte[]'s?

You're right. :( It doesn't index byte[]'s either. What does work is 
converting to String's and indexing them. So that's what we're going to do. 
It sucks, but it works fast.

http://amphibian.dyndns.org/index-test/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080710/b75e1d27/attachment.pgp>

Reply via email to