Performance issue on computed subforms

Hello,

there are some articles here discussing decreasing performance on opening Notes documents if the form contains a lot of computed subforms.

There is a very stupid workaround: Make sure that in every subform there is at least one line of LotusScript in the Globals section like

dim notesIsStupid as integer

notesIsStupid=True

Unbelievable but true…

Subject: I create a tool

I created a tool to repair this problem and published it at openntf:

http://www.openntf.org/Projects/LNFreewareCatalog.nsf/BySubContributor/60BC719B4AA716F18625728600442F72

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.

Subject: Performance issue on computed subforms

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.

Marc-Oliver - have a virtual beer on me !!

Cheers,

Bill.

Subject: Incredible!

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!

Amazing. Hats off to you sir!

Subject: Performance issue on computed subforms

Hello,

First, thanks a lot Marc-Oliver for your unbelievable solution :-))

But I still have tow questions.

Is this solution tested moor yet? In another words, is it stabilized?

Can I use this variable to resolve other performance problems? And, is there other variable like “notesIsStupid”?

Thanks again.

Subject: Performance issue on computed subforms

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.