Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...


Daniel Nashed

ComputeWithForm Performance

Daniel Nashed – 16 April 2012 08:43:28

I have done some analysis for a customer which lead to a PMR and a SPR which is marked as an enhancement request.
We got feedback that this is not going to be addressed in the current code stream but I think this is still a quite relevant improvement specially for customer and business partner applications.

In our analysis it turned out that with NSFNoteComputeWithForm (and also when you use the derived functions in LS and Java)

a.) subforms and shared fields are not cached from cache.ndk

b.) and also when searching subforms and shared fields (potential more we did only find those in client_clock data) the design collection is searched instead of using FINDDESIGN transactions.

So not only the cache.ndk is not used but also those transactions are not optimized.
It means that if you have multiple subforms and shared fields for each of them the design collection is read -- every time.

For a database with many design elements this means a quite lot overhead.
So instead of zero bytes going over the wire if cache.ndk would be leveraged (after the design element has been loaded for the first time) instead of a cheap transaction
(FINDDESIGN -- transfering only a couple of bytes) we have many transactions reading the design collection.
For a database with large design each of those lookups could be multiple 64k read transactions until the design element is found.

Those transactions look usually like this:

(442-79 [618]) READ_ENTRIES(REPC125757C:00308E76-NTFFFF0020): 34 ms. [76+64958=65034]

The internal number for the design collection is 0xFFFF0020. And you can see that a 64K block is read.
The number of reads depend on the size of the database design and where in the design collection the design element is located.
So you could end up having 3-15 additional transactions with

This sounds like code that has not been changed when the design cache was introduced long time ago.
We got a SPR # BHUY8SELK9 which marked as enhancement request and is not planned to be addressed in this code-stream.
If you are interested to have this enhanced you could open a PMR referencing this SPR.

For now you should be very carefully with subforms and shared fields -- and big main forms if you use "ComputeWithForm" in an application that you access on a server over WAN connections.

-- Daniel



    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]