Browser freezes while initializing/rendering gantt

Hi,

I have a problem with gantt. I use it to display a lot of data, which of course takes some time to load. The loading time itself is not the big issue but when the the data is fed to gantt, or when gantt is rendering (I’m not exactly sure where) it freezes the whole browser.

In my case, I use it in a JIRA gadget, with firefox 52.6.0 (32-Bit). Whenever this gadget is loaded and holds a lot of data, the whole browser freezes for a few seconds, making the impression that it crashed. I already checked my gadget ajax calls, and all of them are asynchronous and very fast. Testing it offline revealed that its gantt that freezes the browser.

How can I avoid this freezing? Is there some init options or is this a bug?

Kind regards

Hello,
If you have a lot of data, it might slow down or hang the browser during rendering. It happens not only because of the number of tasks, but mostly because Gantt needs to draw cells. If you have 10 or 20 years in the scale, it might affect the performance even if you have just a few tasks.

You can try to improve the performance applying the tips from the following article:
https://docs.dhtmlx.com/gantt/desktop__performance.html

Hi ramil,

first, thank you for your quick answer.

Usually the scale range is determined dynamically and ranges from months to about 5 years, most certainly not much more. I leave the option to set the cellscale (days, months, quarters, years) to the user, but the common use is quarters or years.

The article you sent does bring a very nice performance boost, yet the browser still freezes (it’s not slowing, it is completly shutting all browser reaction down, which even results in Windows assuming it crashed) while rendering. It’s nice that it lasts only half of the time now, but it still happens.

Hello,
Thank you for the clarification. Could you reproduce it in the snippet so I can see what might be wrong and send that information to the dev team?
You can edit the following snippet and after you see that reproduces the issue, click on the “Share” button and send me the link:
https://snippet.dhtmlx.com/b3e34d9d5
Or you can send me full HTML page with all necessary JavaScript code and data.

Hi,

after checking my local example which froze the browser, it doesn’t anymore. First I tought the optimizations finally fully worked (the old settings might have been in cache last time). So I took the biggest amount of data I could find and it’s still very fast, even after removing the optimizations you gave me. The Snippet works fast, the local version works fast, but now only the JIRA integrated version freezes. Since at first I didn’t change anything on the local example I have to assume that there is an internal problem that has a different source than dhtmlx gantt.

I can’t quite explain it, neither am I able to reproduce it now. Maybe it is a firefox thing. I will have to make more tests and find the real reason for it. This leaves me quite baffled. So from now I will consider the gantt problem fixed and thank you for your help.

If I am able to find the reason behind it and it does have to do with dhtmlx, of course I will tell you.

Regards

Hi @ramil, Can you please share the config and settings you have used in the code snippet?

Hello Alekhya,
I didn’t use any settings and didn’t change Gantt configuration in the snippet.
If you mean that you want to see a snippet where you can generate tasks, here it is:
http://snippet.dhtmlx.com/63b648b8d

If you need something different, please clarify.