But you do not have to add code into the global sections of the subform. You only have to make a change in the global section and save the design document to compile it.
I found out that the tool ‘Recompile All LotusScript’ from the Domino Designer has a bug which is responsible for the performance problem.
I didn’t believe this until I tried it. It really makes a difference.
On and off during a recent development I’d had sudden dips in performance which seemed to relate to Subforms. I redesigned the application slightly to include some elements directly on my main forms, but there were some areas where my desire to re-use perfectly good bits of form design using subforms simply wouldn’t allow me to copy and paste the same things twice. (I shouldn’t have to !!)
After a particularly impressive bit of slowing down earlier today I had another look on this forum, having looked several times before, but somehow missing this post ! Glad I found it now.
Even a simple Print statement in the Initalise event does the trick. A document which could take up to 30 seconds to open (with many embedded views) is now there before my eyes in less than a second.
I would love to know the reason, but I bet we never will.
My performance seemed fine until I added one more subform and then suddenly BANG…went from < 1 sec to 5 seconds to load. had NO idea what to do. Even removed the subform but it still never returned.
Then added the text:
Dim loadfaster As Integer
loadfaster =True
into the initialize section of every subform and good lord, IT DID WORK AS PRESCRIBED!
Fantastic workaround. Thanks to your idea. I have been suffering with performance problem with 25 subforms. The document opens after 10 minutes only if any of the combination of those subforms are to be displayes. I have other subforms which also get displayed alsong with this. But those are just 2 or 6 in number which are fine enough to display without the combination of those 25 subforms under a particular section.
But when I applied the suggested workaround, though it looks stupid, the documents opens within 3 seconds as compared to never opens or opens after 10 minutes scenario.
I don’t know when these types of glitches will be fixed. But anyway thanks for the workaround.