Hi all,
I'm currently in the process of migrating functionality within excel from VBA event handlers, notably the use of worksheet change handlers, to OfficeJS and I'm having some odd performance issues which do not seem to be documented well.
The workbook itself is quite large and performance intensive, taking several real time data feeds into its calculations. VBA based event handlers have always been instantaneous and invariant to the load on the worksheet to which the change event is attached. OfficeJS event handlers have a latency between the trigger within the worksheet and the callback in officeJS being fired which appears to be a direct function of the load on the worksheet, this latency can be as high as 5 seconds despite the calculation time of the worksheet being an order of magnitude less. Shedding load within the worksheet will reduce the time proportionally.
Is there a mechanism through which events can be fired and received in officeJS prior to the sheet being recalculated or any workarounds which anyone is aware of?
Doing simple tests using the examples within scriptlab for OnChange events can reproduce the results I'm seeing if the target sheet is sufficiently performance intensive.
I have tried databinding events on ranges and these also appear to fire after the sheet has been fully recalculated. I need a mechanism to relay change events into office JS which is not so strongly tied to load on a worksheet? I'm unable to migrate if I cannot mitigate these latency issues
(Cross posted from my colleague - stack overflow)
I'm currently in the process of migrating functionality within excel from VBA event handlers, notably the use of worksheet change handlers, to OfficeJS and I'm having some odd performance issues which do not seem to be documented well.
The workbook itself is quite large and performance intensive, taking several real time data feeds into its calculations. VBA based event handlers have always been instantaneous and invariant to the load on the worksheet to which the change event is attached. OfficeJS event handlers have a latency between the trigger within the worksheet and the callback in officeJS being fired which appears to be a direct function of the load on the worksheet, this latency can be as high as 5 seconds despite the calculation time of the worksheet being an order of magnitude less. Shedding load within the worksheet will reduce the time proportionally.
Is there a mechanism through which events can be fired and received in officeJS prior to the sheet being recalculated or any workarounds which anyone is aware of?
Doing simple tests using the examples within scriptlab for OnChange events can reproduce the results I'm seeing if the target sheet is sufficiently performance intensive.
I have tried databinding events on ranges and these also appear to fire after the sheet has been fully recalculated. I need a mechanism to relay change events into office JS which is not so strongly tied to load on a worksheet? I'm unable to migrate if I cannot mitigate these latency issues
(Cross posted from my colleague - stack overflow)