I have been working on an application that has a rather complicated form that includes three embedded subforms. QA testing on unrelated enhancements identified performance issues with this form. The current production release would load documents with this form in 3 seconds. The new QA build would load documents with this same form in 30 seconds. After as series of tests it was found that the subforms were causing the slow perfromance (e.g. taking the fields on the subforms and pasting them into the form made it run much faster). I did some research and found the following blog suggesting that adding a Print "" statement to the initialize module of the subform. Sure enough when I did this, my documents were again loading in 3 seconds. Further testing showed that almost any LotusScript code could be added and have the same effect.
I settled on adding a Stop statement as this seemed to have less impact on the application. Subforms are known to have an exponential impact on performance when the number used starts to get large. But having seen this with just three subforms I am now tempted to add a Stop statement in the Initialize module of ALL my subforms from now on to improve the performance. It is somewhat ironic that Stop means Go!!
Comments (4)
is a comment also enough?
The technote on this (# 1210783 ) says that the issue only occurs when subforms use script libraries. The Domino fix list says this issue, SPR# DPOL6DTGTH, was fixed in 8.0.2.
Something else that is turning up a lot in relation to subforms for those moving to Notes 8.
I have seen a few people use subforms as a way to decorate the
page. So they would have a subform of the same design multiple
times in the document.
This actually isn't allowed as it has been known to cause
corruption/crash issues. But you can cheat by using a formula to
generate the subform.
For Domino 8 due to a crash issue this loophole has been closed and
the form will just not render if it sees two or more of the same
subform. The domino console should display a warning as well when
this happens.
Just something to be aware of in case you have done this.
It turns out that adding Option Explicit will also work. Less invasive and actually a good thing to add..