Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1010
How can we update an igGrid without creating a transaction or committing the dataSource?
posted

Hi Support,

While doing performance testing on our application, I noticed in our igGrid, a call to dataSource.commit() takes some time. 

What we want to achieve is to update a countdown time value in one of the columns. Is there a way to do this without changing the underlying dataSource, or calling commit? Would just doing a grid.igGridUpdating("updateRow", x, y) without calling commit be enough? Would this cause increase memory usage since we are not clearing the transactions?

Thanks,

CR

Parents
No Data
Reply
  • 5513
    Offline posted

    Hello CR,

    It's quite strange that calling commit on the data source instance could have a performance impact. If you are calling it for the grid like this:

    grid.igGrid("commit");

    It is at least understandable for bigger grids as it does cause a data re-render.

    Anyhow, the highest performance impact is always with rendering in the DOM so if you want the changes to be shown to the end-user, depending on the exact scenario, it may be impossible to speed up. As I don't know how your logic works and how you do the API calls (some sample could  be really helpful here) I can just give you some general guidance.

    1. Calling commit is only necessary if you don't have autoCommit enabled. Try both updating the records with autoCommit enabled and without (but then only call commit once for the whole bunch) to see if there is any positive impact on performance.

    2. If re-rendering cannot/should not be avoided, try enabling virtualization to render fewer actual DOM elements.

    On the other hand, if you indeed experience issue with calling commit on the dataSource instance, you could try updating your underlying data directly (without going through the update procedures integrated in igDataSource) then call dataBind to get the data source to refresh with the new data you have.

    Best regards,

    Stamen Stoychev

Children
No Data