Hi,
We have a UltraWinCalcManager to which we add a number of controls and CalcSettings through the SetCalcSettings method of the UltraWinCalcManager.
What we are seeing is that it takes an amount of time to make these calls to the SetCalcSettings method - certainly longer that we would like it to take.
Each call is surrounded by a SuspendCalc and ResumeCalc; but I don't know that this actually has much impact in the amount of time taken.
Are there any recommendations as to the sequence of calls that we should be around a call to SetCalcSettings?
We're adding about 500 calculations to the calc manager so would like to improve this call if at all possible.
Cheers
-aj
Hi AJ,
alanmjackson said:Each call is surrounded by a SuspendCalc and ResumeCalc; but I don't know that this actually has much impact in the amount of time taken.
Surrounding each call with a suspend/resume will not do any good. In fact, that might even slow things down. If you are adding 500 calculations, then the thing to do would be to SuspendCalc, then add all 500 calculations, then ResumeCalc after they are all added.
Hi Mike,
We've already tried that, but it didn't seem to make any difference
is there anything else we can do?
Alan
Hi Alan,
If Calculations are suspended then adding formulas should be pretty quick. It's just a matter of taking an object and putting it into a hash table and maybe doing some basic validation. So I can't see why this would be slow.
What kinds of controls are you applying formulas to? Are there a lot of dependencies (formulas that rely on other formulas)?
At what point does the delay manifest itself? Are you sure it's the actual adding of the formulas that is slow and not something else like the loading of the form? How are you measuring the time?
Can you reproduce the behavior in a small sample application and post it here so I can check it out?
I too am having problems with the calc manager. I am adding a large number of calc settings to the manager between a suspend and resume calc. However when i resume calc it can take up to 15 seconds before it seems to start doing anything. I have been profiling the use of the calc manager with ANTS 6.3 and i have a heavy delay on the ResumeCalc which is making my application currently unusable.
I am registering a reference type object, which has a value stored in the text property and treated as a decimal, and then i am registering another object which has a formula that points to this reference object. On update of the reference object, the formula of the instance reevaluates as expected and the values are correct, but the delay is significant when a number of items are registered in the network.