Performances with hidden nodes

4 posts, 0 answers
  1. Marcello
    Marcello avatar
    78 posts
    Member since:
    Apr 2013

    Posted 01 Mar 2019 Link to this post

    Hi,

    with the latest release the performances of KendoTreeView are much improved.
    Applying a search strategy like in https://docs.telerik.com/kendo-ui/controls/navigation/treeview/how-to/filtering/filter-out-search-results, however, response times are still disastrous.

    Is it possible to remedy?
    Thanks a lot,
    marc.
  2. Joana
    Admin
    Joana avatar
    210 posts

    Posted 05 Mar 2019 Link to this post

    Hello Marcello,

    We targeted performance optimizations with the last release, filtering including. However, the filtering concerns recursively traversing through each node and its children. Heavy data might lead to extra time to execute the filter and render the nodes. I suggest that you use kendo.throttle method to limit the number of calls to the filtering method for certain time which will boost the performance:
     
    Updated the referenced article in a dojo that illustrates its usage: DOJO

    $("input").on("input", kendo.throttle(function() {
        var query = this.value.toLowerCase();
        var dataSource = $("#treeview").data("kendoTreeView").dataSource;
      
        filter(dataSource, query);
    }, 300));

    Regards,
    Joana
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Marcello
    Marcello avatar
    78 posts
    Member since:
    Apr 2013

    Posted 05 Mar 2019 in reply to Joana Link to this post

    Hi Joana,

    it may be interesting to discuss the optimization of recursive search algorithms, but in this case it is an obvious bug.
    Your example contains 50 items. Any processor can scroll back and forth at least a billion times without the user noticing. Yet even your example, so simple, clearly shows a waiting time between the keydown and the result. I suggest you try a more realistic example, let's say, without exaggerating, with 5000 items.
    It is quite clear that something does not turn out the right way ...
  4. Joana
    Admin
    Joana avatar
    210 posts

    Posted 06 Mar 2019 Link to this post

    Hello Marcello,

    Thank you for your feedback.

    Indeed, I agree with you that there are search optimizations that could be applied. Moreover, the current implementation of the filtering empties the treeview container and re-renders the respective items which comes also at a price. However, for the short-term future we have not planned further revising and optimizing the filtering. We appreciate your feedback and will take it into account for prioritizing performance enhancements. 

    Regards,
    Joana
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top