На 03.10.11 09:29, Petr.Valik@tieto.com написа:
I'm using Jitsi 1.0-beta1-build.3651 on Ubuntu 10.4 and LDAP service for searching contacts. LDAP server is ActiveDirectory domain controller.
What I need to decrease is the time between typing of the name (or part of the name) and the presenting the results.
Is there any simple way how to do it?
Note that Jitsi only generates a query and then gets the results.
There's not much it can do in terms of optimizing the actual search. For
the record, I am using the feature daily against an LDAP server with ~
100 000 entries and always get my first results within 1500ms.
I have following tips:
1) Search the LDAP after input of first 4 characters or more (currently it starts with searching after first 2 chars)
Well, we only show the first ten results in such cases, so this
shouldn't be too much of an issue.
2) Change of LDAP filter syntax:
Currently FILTER = "(|(|(|(|(|(|(|(|(uid=*st*)(gn=*st*))(sn=*st*))(cn=*st*))(givenname=*st*))(surname=*st*))(commonname=*st*))(displayName=*st*))(mail=*st*))"
My suggestion FILTER = "(|(|(|(|(|(|(|(|(uid=st*)(gn=st*))(sn=st*))(cn=st*))(givenname=st*))(surname=st*))(commonname=st*))(displayName=st*))(mail=st*))"
... because mostly user is starting to write the name from beginning
Have you tried this? Does it really make any difference? I was chatting
with Ingo yesterday and a quick test with his server didn't change anything.
3) Is there any possibility of cahing the LDAP results?
This could lead to all sorts of trouble. We'd have to determine how long
to keep them for so that they don't hog available memory and without
risking them becoming irrelevant. Do you have a specific algorithm in
mind? If so, can you tell us how you expect it to perform better than
what's currently implemented?
Then again, a properly configured server can run queries over tens or
hundreds of thousands of users in milliseconds so caching stuff on the
client in an optimization effort sounds (to me at least) as a bit of an