jQWidgets Forums

jQuery UI Widgets Forums Grid Grid optimizations | Grid malfunction fix

This topic contains 2 replies, has 2 voices, and was last updated by  Llorx 8 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • Llorx
    Participant

    I’ve noticed that each time you update one row or cell, all the cells on the grid are redrawn, although you only updated one small square.

    I’ve checked the source code and saw that you clear the _cellscache with each change in one cell (setcellvalue), when you call “updaterow” and also when you simply change the grid selection.

    That’s a problem because my grid has some custom HTML with CSS animations created by cellsrenderer function, and each time a row is updated, the animations of the rest of the rows are restarted giving a bad sensation. I don’t want the animations of the entire grid to restart when I just select one row just because the HTML is resetted to something that is already on it.

    Also, the overhead that it means. Is much much much optimized to redraw only the changed cells. I know that you know it because you created a _cellscache for some reason. Simply, optimize it a bit instead of clearing it for just one change. That breaks the purpose of your cache.

    PD: All the rows being updated when selecting one element happens because I added a thrird parameter to “updaterow”, which don’t redraws the entire grid and I do the HTML changes “manually” instead of letting cellsrenderer do the work, but the _cellscache is not updated too, so when changing the selection, the rows return to the old _cellscache status.


    Peter Stoev
    Keymaster

    Hi Llorx,

    Thanks, we will consider your feedback. If you feel comfortable to make the changes, you can make them for your project. At present, we have no plans to make changes in the Grid rendering logic and we think its performance is good and such optimizations are with low priority for our team.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    Llorx
    Participant

    Yes, when I edit a cell, I modify his boundata directly, delete his “_cellscache” entry manually and call “_renderrows”, which refills the empty or different “_cellscache” items only, so I don’t need to call “render”, “setcellvalue” or “updaterow”.

    Now It works like a charm, but is a bit hackish as I’m accesing private elements that maybe can change in the next updates.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.