Hello, exporting gantt to ms project takes a very long time, causing the whole UI to freeze. As I found out, this is related to the export of the calendar. If you delete the calendar, the export will be instant. Same problem with your online demo. Please help me solve the problem.
I am attaching a json file with data that comes from the back-end for the gantt.
Support Forum
- Attachments
-
- example.json
- (53.28 KiB) Downloaded 51 times
Hey Ayurchenkoi,
Thanks for the report, we'll be analyzing that scenario and provide you some insights or updates on exporting features after that (if needed). Please follow the ticket for updates https://github.com/bryntum/support/issues/5664
Best regards,
Márcio
Hi,
We reproduced incorrect behavior (long export) on your booth (https://bryntum.com/products/gantt/examples/msprojectexport/), img in attachment
Scenario: when a calendar other than Default is assigned to each schedule job. It hangs on your test, even with 20 works with different calendars, in our case, there are 1000+ such works
- Attachments
-
- 3.png (130.12 KiB) Viewed 1171 times
Hello.
We've started on the issue and found the reason but haven't 100% properly resolved it yet.
So far a workaround could look like this:
// override MspExport feature class
class MyMspExport extends MspExport {
static get $name() {
return 'MspExport';
}
// clone original calendar when exporting calendar weeks
formatWeekDays(calendar) {
return super.formatWeekDays(calendar.copy());
}
}
// register our overridden feature
GridFeatureManager.registerFeature(MspExport, false, 'Gantt');
// override calendar model to fix "intervals" field cloning
class MyCalendarModel extends CalendarModel {
processIntervalsStoreData(value) {
// clone intervals when copying calendar model
if (value?.isStore) return value.getRange().map(interval => interval.copy());
return value;
}
}
new Gantt({
project : {
// let project know of the overridden calendar model
calendarModelClass : MyCalendarModel,
...
},
...
})
Please let us know if that works for you.