kendo-ui-core icon indicating copy to clipboard operation
kendo-ui-core copied to clipboard

Adding multiple new tasks to the Gantt causes the browser to become unresponsive

Open IvanDanchev opened this issue 3 years ago • 0 comments

Bug report

Reproduction of the problem

Reproducible in the demos (MVC and Core): https://demos.telerik.com/aspnet-mvc/gantt

  1. Select a task in the Gantt's treelist (e.g., Market Research).
  2. Click on the "Add Task" button in the Gantt's toolbar and select "Add child" from the dropdown.
  3. 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]

IvanDanchev avatar Aug 01 '22 14:08 IvanDanchev