Hello there.
Is there any way to improve the perfomance, when D&D a task with many links? (in this example “Ordner: NE4 Flow” from “Bauabschnitt 1”)
DHTMLX Snippet Tool here is the link to the snippet with the data
Kind Regards
Hello there.
Is there any way to improve the perfomance, when D&D a task with many links? (in this example “Ordner: NE4 Flow” from “Bauabschnitt 1”)
DHTMLX Snippet Tool here is the link to the snippet with the data
Kind Regards
Hello,
Thanks for the attached snippet. I noticed that there are a lot of duplicate links in your data where the source
, target
and type
properties are the same. However, Gantt creates all the attached links, so they are overlapping each other. And this has an impact on the rendering during drag-and-drop tasks. You can filter your data to remove the duplicated links before parsing it to the Gantt.
Please check the example of how it might be implemented:
https://snippet.dhtmlx.com/u2juxrjp
The performance can be affected by different Gantt settings.
Please check the ways to increase the performance from the article:
https://docs.dhtmlx.com/gantt/desktop__performance.html
Hello.
Yes you are correct, there seems to be an issue with the datastructure I use to generate the Gantt Data.
However, it could be the case that there are double the amount of links or even more than that in a project. (the error produces quadruple the amount of connections as far as i am concerned
I am a bit confused, why this is an issue for the Chart. I know that it is possible to load way more steps and links, if they are connected one to one. There seems to be an issue with the internal “endDrag” handler, that calculates something with non linear cost over the links that a Step has.
Do you have any further ideas how to fix this problem, or at least reduce the lag on endDrag somewhat?
Kind Regards
Hello Henrik,
Thank you for letting us know about the issue. Even when there are no duplicate links, I see that it takes some time to finish the task drag with many links.
If a task has only around 200 links as it is in your case, there is nothing wrong after the task drag:
https://snippet.dhtmlx.com/hpqlf28i
And if I delete all links for other tasks and keep only the ones related to the Ordner: NE4 Flow
task, there are no performance issues.
Maybe the issue is related to the link chains.
I added it as a bug to our internal bug tracker. The dev team will fix it in the future, but I cannot give you any ETA.
As a workaround, you can disable the show_links
config in the onBeforeTaskDrag
event handler so that Gantt won’t process the link nodes. Then you need to enable the config in the onAfterTaskDrag
event handler and call the render
method to repaint the links:
gantt.attachEvent("onBeforeTaskDrag", function(id, mode, e){
gantt.config.show_links = false
return true;
});
gantt.attachEvent("onAfterTaskDrag", function(id, mode, e){
gantt.config.show_links = true
gantt.render()
});
Here is the updated snippet:
https://snippet.dhtmlx.com/1pfj7qet