We've experienced some slow downs with syncing to the backend. We've pinpointed the error to the upgrade between 5.2.7 and 5.2.8.
When using
ProjectModel.sync()
we've gone from speeds of:
1297 ms to
12582 ms
When creating around 300 events and 300 dependencies. Please note that the response time from out server is around 500 ms in both of these instances.
I've found that in the the class AbstractCrudManagerMixin.js
async internalOnResponse(request, responseText, fetchOptions) {
...
await me.applyResponse(request, response, options); // Line 1147 on 5.2.8
...
}
It seems that the slowdown happens here. Atleast if I put a break point before and after it takes around 10 seconds to hit the second breakpoint. Hope you can help/reproduce.
Cheers
Andreas @ Exigo
Re: [ANGULAR] Slow down in syncing big requests
Posted: Mon Mar 13, 2023 4:50 pm
by mats
Is it the same for you if you try 5.3?
Re: [ANGULAR] Slow down in syncing big requests
Posted: Mon Mar 13, 2023 4:59 pm
by Exigo
Hey Mats. I also tried to upgrade to 5.3. Same issue.
Re: [ANGULAR] Slow down in syncing big requests
Posted: Mon Mar 13, 2023 8:31 pm
by marcio
Hey Andreas,
Would be possible to provide a test case with minimum configuration about how are you creating the events and dependencies? Perhaps creating a custom project based on a demo for us to check and analyze your case and the performance of that ProjectModel.sync() function.
Re: [ANGULAR] Slow down in syncing big requests
Posted: Tue Mar 14, 2023 12:56 pm
by Exigo
I tried on this with attached data, but it does not handle dependencies.
You can see how i create a lot of events further down:
for (let i = 0; i < 300; i++) {
const firstEvent = scheduler.crudManager.eventStore.last;
scheduler.crudManager.eventStore.add({ startDate: new Date(), duration: 24, durationUnit: "h" });
const secondEvent = scheduler.crudManager.eventStore.last;
if (firstEvent) {
scheduler.crudManager.dependencyStore.add(
{
from: firstEvent.id,
to: secondEvent.id,
}
);
}
}
Re: [ANGULAR] Slow down in syncing big requests
Posted: Tue Mar 14, 2023 1:42 pm
by Exigo
Hey Again. After some tests in our own code it seems that dependencies is not important. It seems to happen when syncing a lot of tasks. I'll see if I can pinpoint it and make a case, cause it does seem like it is something in our code that is not making nice with the 5.2.8 version.
Re: [ANGULAR] Slow down in syncing big requests
Posted: Tue Mar 14, 2023 3:15 pm
by marcio
Hello,
We'll be waiting for your test case to help us check this issue and pay attention if other users report the same performance issue on sync!