а

Gantt Verry Slow when gantt.config.work_time = true on long duration Tasks


#1

Performance is very bad when gantt.config.work_time = true on long duration Tasks.
I am using calendars and my Task duration is stored in minutes, so I have gantt.config.duration_unit = ‘minute’. I have also setup multiple dynamic scales (minutes, hours, days, weeks, months, years). I have noticed that gantt takes time to load if I have a task that is 1 year long (with duration stored in minutes) - This is only a problem when gantt.config.work_time = true.

Also, I’m are storing start_date, end_date and duration in the database so on parse, I wouldn’t want the gantt to recalculate the task duration since it’s already provided. This just adds to that performance issue.

gantt._init_task_timing = function (task) {
//…
if (task.start_date && task.end_date) {
task.duration = this.calculateDuration(task);
}
//…
};

Snippet - http://snippet.dhtmlx.com/6cadd27c7


#2

Hello,
Thank you for reporting about that. I added it in the tracker as a bug. The dev team will check what might be wrong there. I cannot give you an ETA, but I will notify you when it is fixed.


#3

For everyone else: the bug with the work time was fixed in the 6.1.3 version:
https://docs.dhtmlx.com/gantt/whatsnew.html#613
You can test that it is no longer reproduced in the following snippet:
https://snippet.dhtmlx.com/797c6074b