Search code examples
xpageslotus-noteslotus-domino

Best Practice to limit NotesViewEntryCollection from getAllEntries


I want to create better web service that display collection from NotesView with pagination.

And I have found some performance issue of View.getAllEntries from bigger view.

On MongoDB, I can use findAll() with skip() and limit().

How can I do like that on Domino ?


Solution

  • Use the ViewNavigator class. If you are paging through a large view, it is much faster than view.getAllEntries().

    You can acquire an instance of ViewNavigator with view.createViewNav() or a similar method. For best performance, call view.setAutoUpdate(false) before you acquire the navigator.

    You can find lots more information by searching the web. This article looks like a good place to start.