Re: [Evolution] LDAP autocomplete ...



On Tue, 2002-03-12 at 15:36, Yatin Chawathe wrote:
On Tue, 2002-03-12 at 15:26, Chris Toshok wrote:

Yeah, I'm pretty sure more is going on with the completion code..  I'll
take a look - we also need to have it give status about queries in
progress.

Are you at all considering an explicit-completion mode rather than
auto-completion, where the user explicitly controls whether and when the
LDAP server is queried e.g. by pressing a specific key combination?

I'm not at the moment, no.  It might actually come to something like
that eventually, but I'd rather make the current machinery work well
enough that you don't notice any lag and it doesn't get in the way.

How does the code currently determine when to send a query to the LDAP
server?  If I am typing "t o s h o k", does it send more and more
specific queries as I type each letter?

Yes, and that's part of the problem.  Performance-wise, it might
actually be better to continue the previous search through to
completion, pruning entries on the client side as the user keeps
typing.  Starting a new ldap search is expensive, as it seems the
(openldap) ldap server doesn't respond to new searches after an abandon
request very quickly.. There's a rather large bit of lag, depending on
the size of the previous search result it seems, between the new search
request and the first results trickling in.

I'm looking at playing with the timeouts used for completion now.  It's
50ms, which is IMO too small, and it drops to 1ms if the popup is
actually up, which is *way* too small when you're using a networked
addressbook (if each keypress results in a query).

If I'm typing quickly, I generally don't want the UI locking up on me
(because it generally means I know the email address I want, and it
doesn't need to complete it for me.)  Once I stop or if I'm typing
really slowly, it's ok to query and complete or present alternatives. 
Yes, I live in the magical world where everyone types quickly and the
only people that don't are the ones that aren't sure what they're
typing.. :)

I'm also adding in code now to the ldap backend that communicates to the
UI whether a search generated more entries than the server was willing
to send (or more than you had configured for the maximum number to
return.)  Right now for LDAP the completion stuff never caches previous
completed search results to keep from initiationg a new search when you
press another key.  It should cache them unless the search completed
without getting all the results.

The thing to remember is that the completion code was written without
networked addressbooks in mind.  Support for them was added completely
as an afterthought.  I mean, the knowledge base entry regarding
completing from ldap says it's unsupported, doesn't it?  By the time the
feature actually comes up on a supported feature list (with a UI for
managing it), and not just "here's how to hack this feature in using a
text editor", it will be working much better.

Chris




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]