Good point, I added the NotesView.GetEntryByKey() loop also, and guess what, it's slower than the first 2 methods, and only slightly faster than method 3.
I updated the test database download too.
Typical times for the 4 loops (in seconds), the first column was a test run with McAfee On-Access scan enabled, so it was a bit slower for all Methods, the 2nd colum is a typical test run which didn't change much after multiple repeated runs:
Method 1) 18.42, 14.23
Method 2) 14.06, 12.87
Method 3) 25.74, 18.13
Method 4) 21.29, 17.73
This test was only to find out what is the fastest method to get a single document's fields by key from a view or database.
If the document UNID is available in the application, I would assume that NotesDatabase.GetDocumentByUNID would add some more speed.
Next I have to test also what is the fastest traversing speed if you want to scan the fields of multiple documents, the competitors are:
NotesDocumentCollection is disqualified from this race since it doesn't return the documents in the view order.
I'll keep the test logbook updated on: