kendo-ui-core
kendo-ui-core copied to clipboard
Adding multiple new tasks to the Gantt causes the browser to become unresponsive
Bug report
Reproduction of the problem
Reproducible in the demos (MVC and Core): https://demos.telerik.com/aspnet-mvc/gantt
- Select a task in the Gantt's treelist (e.g., Market Research).
- Click on the "Add Task" button in the Gantt's toolbar and select "Add child" from the dropdown.
- Repeat step 2 until the browser becomes unresponsive.
Current behavior
The issue seems related to the _subtree method in kendo.treelist.js. This number of calls of this method increases with every new task. The time it takes for every next task to be added increases. After adding a few tasks _subtree is now called thousands of times every time a new task is added, which results in a Maximum call stack error.
Expected/desired behavior
Performance should not degrade when adding new tasks to the Gantt. The browser should remain responsive.
Environment
- Kendo UI version: 2022.2.621
- jQuery version: x.y
- Browser: [all]