When the resource histogram is displayed with a long span like many years, the browser freezes.
This issue is reproduced on https://bryntum.com/products/gantt/examples/resourcehistogram/
If the calendar is complicated, this issue will be even worse.
How to reproduce
Add calendar intervals (optional.)
gantt.project.calendars[0].intervals.add([
{
"recurrentStartDate": "every weekday at 12:00",
"recurrentEndDate": "every weekday at 13:00",
"isWorking": false
},
{
"recurrentStartDate": "every weekday at 17:00",
"recurrentEndDate": "every weekday at 08:00",
"isWorking": false
}
]);
Zoom out the timeline.
gantt.zoomTo(0);
Shift the timespan
gantt.shiftNext();
Expected
Zoom and shift can be done without having the browser freeze.
Observed
The browser freezes on the step 2 and 3.
Re: Overload when resource histogram shows long span
Re: Overload when resource histogram shows long span
Posted: Wed Mar 01, 2023 6:44 am
by takafumi ohtake
Hi Bryntum support,
This performance issue sometimes makes our app crash.
Could you please prioritize this issue more?
Re: Overload when resource histogram shows long span
Posted: Wed Mar 01, 2023 7:38 am
by alex.l
Hi,
I will let our product management know that and try to push it! Thank you for your patience!
Re: Overload when resource histogram shows long span
Posted: Thu Mar 02, 2023 5:16 am
by takafumi ohtake
Hi Alex,
Thank you for your reply.
I want to add additional information.
When there're many tasks to render in the histogram, this issue is more frequent and severe.
I tested it with 500 tasks over 1000 days and four resources. The app often crashes in long-span view such as quarterly and monthly.
I hope the histogram component work without performance issues (especially without a crash) in such condition.
Re: Overload when resource histogram shows long span
Posted: Thu Mar 02, 2023 6:46 am
by alex.l
Thank you for the information! I notified product management about your request and they promised to put into nearest releases, not sure about nearest one, but also possible.
Re: Overload when resource histogram shows long span
Posted: Tue Mar 21, 2023 5:12 am
by takafumi ohtake
Dear Alex,
I wanted to bring to your attention that one of our large customers has also reported this issue.
As this problem is critical for us, I was wondering if you could provide us with an estimated release date for the fix.
Thank you for your time and attention to this matter.
Regards,
Takafumi
Re: Overload when resource histogram shows long span
Posted: Tue Mar 21, 2023 1:23 pm
by arcady
Hello,
I've checked the ticket and it has this call:
gantt.zoomTo(0);
Doing the call actually means that you request the histogram to collect allocation data for a 125 years time range.
Even though most of the time range is not allocated to tasks max allocation time still has to be collected.
And I think specifying minZoomLevel makes perfect sense. When you request to collect data for a huge time range you are expected to have a super fast machine with a lot of memory that can handle that. And I don't think all users have such machines so limiting zoom is the way to go.
Other than that I don't see an easy way for fixing that. We can try refactoring calendars (which cache filling causes that freezing) but that will be a really time consuming task I'm afraid.