DataSource.remove() performance issues

2 posts, 0 answers
  1. Johannes
    Johannes avatar
    1 posts
    Member since:
    Mar 2016

    Posted 14 Apr 2016 Link to this post


    I'm working with Angular and Kendo UI. I want to update an extising grid through an ajax call. I had to iterate over all items in datasource and compare them with the result of ajax call. If i got the item from the response, i had to update, if not i had to delete the item from the grid. Update works fine, if I doesnt use the getter and setter from the model. Now i only got problems with removing the items.

    At first I changed the change event for the grid like preventDefaults, if im updating. Now my execution time was shrinking from ~100s to 13s. I tried the same for the datasource but it doesnt work.

    Over all I got ~ 1200 items in my grid. I had to delete ~ 600. The average time per removing is 20ms, so the whole update takes 13sec and the most impact is located at the remove.

    Is there any way to speed up the remove without recreate the datasource. If I recreate the datasource, i loose the focus and cant easyily reselect the items.

    Thanks for your help.


  2. Kiril Nikolov
    Kiril Nikolov avatar
    2598 posts

    Posted 18 Apr 2016 Link to this post


    Have you tried using the push methods that can update more than one record? For example:

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top