Performance Question @For version Lotusscript

Does anyone know if @for is more effective than looping through a list using “For” or While statements in Lotusscript.

I intend to put a field on form which processing the value of other fields. This can also be done using webqueryopen agent. So I am wondering if anyone thinks @For would be more effecient and resource intensive that using Lotusscript in webqueryopen agent.

Thanks for any responses.

Subject: In general @Formulas will perform much better than anything but the C API

when manipulating Domino data. However the question is How much data are you processing? If you are just looping over 10-20 things, you will not see much difference at all.

Subject: RE: In general @Formulas will perform much better than anything but the C API

I don’t think anyone really knows. From tests that have been made on on DBLookup vs. GetDocbyKey it always seems that @formula is more efficient when running on less then 2000 docs otherwise LS becomes the winner. This was true in R5, with R6 @formula being rewritten this may not be the case.

If your app is extremely performance sensitive i would make a few test scenarios and time them to see which is the most performant.

ST

Subject: I don’t know either. He is talking about Looping through a List w/ @For.

Since this is an R6 new feature, I have not done or seen any timer testing of this function.

Subject: RE: I don’t know either. He is talking about Looping through a List w/ @For.

I was talking abotu @dblookup in R5 comarpred to GetDocbyKey. @for and for would be like comparison and would probably* express a like raltionship in terms on performance (i.e, the short the list the more efficient @for will be, the longer then use LS for).

Hope this was more clear.

ST

Subject: RE: I don’t know either. He is talking about Looping through a List w/ @For.

Thanks for the thoughts and comments. The application I am developing is performance sensitive and I am trying to squeeze every bit out of it.

Perhaps these numbers are small in the US but here I think the numbers that we’re expecting is pretty big. 2000 users, expected 200 online users at any one time, expected response time less than 10 seconds for almost all operations.

The application will be hosted on a Solaris machine with 4x900Mhz CPU, 8GB RAM.

We will be using Ratinal Tester to simulate a load test. I’ll write any observation on the performance if I can.

Subject: Performance Question @For version Lotusscript

Any @function solution to this issue is likely to be faster than a WebQueryOpen agent, if you are ONLY using the WQO to handle this process.

Loading the agent context in the HTTP renderer is a very expensive operations, whereas even the most cumbersome @function doesn’t have to load a new context. Unless you are going to incorporate the LS-based solution into a WQO agent that you already have to run, you should find the @For techinique considerably faster.

Subject: RE: Performance Question @For version Lotusscript

Nathan’s right - loading a WQO agent is a huge expense (even more in ND6 than it was in R5, with the additional security checks involved). I haven’t performed any serious testing of looping in @Formulas, but I’d bet it’s significantly faster than an agent. If you care about scalability and can avoid a WQO agent, then by all means do so.

Subject: RE: Performance Question @For version Lotusscript

Erik and Nathan

Thanks a lot. Based on your insight, I am much confident that my decision to avoid WebQueryOpen agent at any cost is justified. I will be doing a load test using Rational tester and I’ll update this post on the outcome.