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

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 -

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.

For everyone else: the bug with the work time was fixed in the 6.1.3 version:
You can test that it is no longer reproduced in the following snippet: