Performance issue with getConnectedGroupRelations method

we are seeing performance issue with method, this.getConnectedGroupRelations where there are huge relations in a project, say about 500+ relations.

links = _this._linksBuilder.getLinkedTasks(); even though there is handle for link id, you are getting getLinkedTasks always(all 500 relations in this case)

when we tested with _this._linksBuilder.getLinkedTasks(id), seems there is a HUGE performance improvement.
is this a bug or you need all relations for calculations/auto scheduling?

Note: we are in gantt 6.3.3
we did some testing and we are seeing performance 4X… ex: ( _this._linksBuilder.getLinkedTasks(); with 5000 tasks having 5000 relations its taking 17 seconds to add a new dependency, with _this._linksBuilder.getLinkedTasks(id), is just taking 5 seconds to add a new relation !!..)

The getConnectedGroupRelations and getLinkedTasks are internal methods. It is not a good idea to use internal properties and functions as they may change and we won’t inform about that nor provide any instructions for migrating to a newer version.
Instead, you can use the public methods and properties. In the following snippet, it takes less than 1 second on my computer to obtain all linked tasks with the following method:


Hello @ramil
Thank you so much for quick reply. and sorry for not being very clear in my post.
actually we are not consuming getConnectedGroupRelations

we are using gantt.autoSchedule(id). to auto schedule a task. and gantt.autoSchedule is internally using
getConnectedGroupRelations. thats how we found the issue i.e gantt.autoSchedule(id) is taking longer time and performance is not so good

Please advice

@ramil can you please help me here…can you please clarify if its a defect or its working as expected ?

Thank you for the clarification.
Here is an example with 1000 tasks under the same project and enabled auto_scheduling:
If I drag a task there, I don’t have the performance issues.
Even if I add the 6.3.3 version, everything still works correctly:

The issue might occur because of Gantt configuration or something else, but it is hard to suggest what might be wrong as I don’t see your code.
Please, try reproducing the issue in the snippets above, then click on the “Share” button and copy the link.