addSection take too much time, anything else?

Hi,

I use the scheduler coupled with a grid. I’m using this grid to create my section in a timeline view (treemode).
To make it work I use “forEachRow” with the addsection inside.

The problem is that it take’s too much time to finish. For 60 line results of section, I have to wait 1min 14 sec. :open_mouth:
If I put in comment the addsection line in the code, it is nearly immediately done.

Is there something to do, to have better times?

Thanks for your help!

After each addSection call, scheduler will repaint self - which is a log of repainting for 50 sections.
There is no simple way to improve performance, but you can try the next

[code]var temp = scheduler.callEvent;
scheduler.callEvent = function(){}; //will block scheduler repainting

… add 50 sections …

scheduler.callEvent = temp; //restore original logic
scheduler.callEvent(“onOptionsLoad”, []); //repaint[/code]

Thank for this method.
For few addsection, we can see that it is faster but for more addsection it tooks nearly the same time. :frowning:

Have you got any other idea?

Can you provide any kind of sample or demo link where it can be checked ?

Hi,

Sorry I hadn’t told you yet, but I managed to optimised it. In cause was a second code with many “addevent”, I’ve bypassed it with a js push function and parsing.
I have juste 5-6 sec to wait now, this is more acceptable (not perfect but acceptable :wink: )

Thanks for your help !