[HoT 8.3] Batch around updateSettings?

Tags: #<Tag:0x00007efc620e1630>

Hello,

I’ve seen the new possibility in 8.3.0 to batch some call in order to improve performance and avoid unnecessary render.

But should this be also used in unitary method call?
Take for example these two JSFiddle:

You will see that the fiddle with the batch method is much faster.

Is this normal?

I expected that Handsontable methods would be already batched in the inner code and that the batch call would only be useful when several successive calls to Handsontable were being made.

Regards,

Hi @samir.hadzic

we’ve made some tests before and the results were not so different comparing your example. You are adding many new options, not just one as we did. Maybe that’s why we did not added it by default.

Nevetheless, it is great to hear that batching also makes this parts of coding more efficient. We may add this information do our how-to section (in progress) so thank you very much for sharing.

Hi Aleksandra,

We are indeed giving a lot of options in the updateSettings. Is there an overhead when using the batch option?

If no, I believe this method should be batched by Handsontable itself since one can give one or two options, but also a lot more (when re-using a Handsontable instance with other data/layout for example).

Regards,

I’ve already reported the results to our developer. Later on, I will investigate the subject with our tester and check if there are any disadvantages of batching updateSettings. However, at the first glance, I can see only profits.