Question from a reader (XPages-related)... How does Notes get a document by NoteID?
I received a question in my email the other day, and I wanted to open it up to the XPages community. I think that the answer from a Notes client perspective might not be the correct answer given the XPages angle. Feel free to leave comment(s)...
The question is: How does Notes get a document by NoteID?
It seems to me that it takes the NoteID and then compares it to each value in an internal list (index?) until it finds the document. This approach works fine if the database is small. However....I have a client that runs a database containing one million documents. Even at this extreme the user must only wait a second or two for the document to be found and opened, So it is still within acceptable limits. The fun really starts when you have an XPages repeat control that displays data from sixty documents. This XPage can take TWO MINUTES to open! Not so acceptable
I'm sure you know that the repeat control gets documents by NoteID to display. So the Domino server is receiving a list of sixty NoteIDs to find in the database. Now if the NoteIDs were represented in, for example, a B-Tree data structure then it would take only six matches or so to find each document. Instead it seems very much like the server is trying to find each one in a very long list.
I have gotten around the problem by moving the XPages application (including the documents accessed by the repeat control) to a smaller database. This is a bit kludgy but responds very fast to the user. But I'd still like to get some closure with this issue. I'd like to know what really happens in the black-box-that-is-Domino when you ask it to get a doc by ID. So far the IBM people that I've hit with this question have run away and hid. Not very helpful so all I can say now is......
help me Obi-Wan, you're my only hope