Hi,
I am working on a project in which we have the following number of entities:
- 39 resources
- 799 events
- 1177 relations
The problem is that the model takes too long when I apply certain custom logics after loading the data.
These logics try to avoid overlaps and minimize gaps between events.
One of the logics, for example, goes through each event in each resource, detects if there is an overlap with the previous event, and if so, adjusts its start date, like this:
event.setStartDate(refDate, true);
event.startDateConstraintIntervals = [];
await event.project.commitAsync();
For each event it modifies, it calls commitAsync because as the logic moves forward with the next event, it requires to have the updated endDate considering resource calendar and dependencies.
I was applying
event.startDateConstraintIntervals = [];
because at some point (maybe a previous bryntum version), it locked tasks if that wasn't applied.
I tried changing the previous code with:
await event.setStartDate(refDate, true);
but it is still slow.
Do you have suggestions for improvements? Maybe similar code examples?
Regards