On Fri, 26 Sep 2003 16:11:04 +0200 (Romance Daylight Time) Vadim Zeitlin <[EMAIL 
PROTECTED]> wrote:

> On Fri, 26 Sep 2003 15:37:50 +0200 Xavier Nodet <[EMAIL PROTECTED]> wrote:

> XN> But the most time-consuming task seems to be to convert *all* the
> XN> searched strings to lower case so that the search is actually
> XN> case-insensitive. Would it be possible to cache the lower-case version
> XN> of the strings used in the address-book?

>  Yes, AdbEntry could do this. Or, rather, Matches() could do it (it would
> just cache the values on the first call). This seems like a pretty simple
> thing to do, so if this is really the bottleneck, we're saved!

I tried, but this does not work... The problem is that the instances of
AdbEntryStoredInMemory are created during the search! This looks as
follows:

search:
  for each entry
    create a corresponding FCEntry (a subclass of AdbEntryStoredInMemory)
    if it matches
      store it in the resulting array
    else
      destroy it
  end for

See FCEntryGroup::GetEntry and around line 145 in AdbManager.cpp...

This seems to mean that whenever one does a cearch, the whole address
book is parsed *from disk* again. Did I miss something? In any case,
we're not yet saved...

-- 
Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to