Friday, June 28, 2013

Benchmark: Fetching NoteIDs and documents from view

Update 28.06.13: I added a test - using the new NoteCollection.getNoteIds that was introduced in Domino 9.

In relation to an experiment I'm working on, I wrote a Java test agent to find the fastest way to get note id's from a view/fetching document values from documents in a view.

Here are the results from the benchmark:



All numbers are milliseconds. The code was run on a desktop computer (Core 2 Duo/Windows XP).

The benchmark code is written so that I think caching on the server is avoided between tests. What's interesting from the results is that it seems like it's marginally faster to fetch the note ids from the view/open the document by note id if you want to read values from the document.

If you want to run the benchmark in your application, here's the source code:
>> Download

The code is designed for running the test agent in a browser. Change the constants TEST_VIEW_NAME to the name of a view you want to test, and TEST_FIELD_NAME to a field name that the documents in the view have.

If you run the benchmark/get different results, let me know :)