Quoting [EMAIL PROTECTED]:

By the way, I have now finished an import of 6400 users into the CMS. This is
the actual real user data. I divided it up in two steps, first imported 3000
users, then ran db_recover -c (not sure about if the -c option was needed, but it seemed to help before), then imported the rest 3400 and then ran db_recover
-c again. Now Ldapbrowser lists all users in just a few seconds, and a search
for uid=a* takes just a few seconds as well. So all seems to work now. However I'm wondering if the reason it's working now is that we have fewer users (6450 now compared to ~15000 before). I will do more test imports today, in 3000-user
chunks, with db_recover -c in between, and see if/when things go haywire.

Ok, I have now imported some more users, so now the total number of users is
about 17000. Searches that don't result in to many results work fine. But I
tried a search that should result in 10000 users, and it seems to have stuck.

But I have now realized that the problem is not the actual search in ldap, it is
how the CMS does the search, and how it handles the result. First of all, it
fetches *all* fields for all users that match. And then, after the ldap search, it goes through the search result and for each user it fetches more information about him/her that is not in ldap. And since most of these users are not in the CMS cache, they most likely result in a query to the database, one for each user
(no batch query or anything like that). It is now very clear that the method I
used in the CMS API is not intended to be used with filters that match many
users.

I now did a simple search on uid, issuing the search directly to a DirContext
object (from a context pool managed by the CMS), and a query that matched 10000 users finished in about a second. So unless I found some better search method to
use in the API, I guess I will write my own, that only fetches the data that
should be displayed in the search result view (a table with just some basic
info), and that also supports pagination.

/Jimi

---
You are currently subscribed to [EMAIL PROTECTED] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the 
SUBJECT of the message.

Reply via email to