XSnippets – DBColumn / DBLookup (Java) & XPages Toolbox

Ferry Kranenburg posted a new XSnippet on OpenNTF. “Pure Java version of DbLookup & DbColumn, with cache, sort and unique” . I use similar code in my projects and thougt that it would be a great idea to do a performance test. I’m using XPages Toolbox to profile the backend code. Here is the result for a DBColumn call on 18044 documents in a view

Elapsed time: 1622 msec
Methods profiled: 9
Total measured time: 1168 msec

viewNav

Looking at the profiled classes, you can see that the ViewNavigator.getFirst() method is obviously invoked 2 time, but the code itself only contains 1 call to this method. Not sure, if this is due to a bug in XPagesToolbox or a bug in the ViewNavigator class. Anyone aware of this issue ?