DataTables Scroller, Debouncing Scroll Events and requestAnimationFrame

DataTables Scroller, Debouncing Scroll Events and requestAnimationFrame

jcreadyjcready Posts: 44Questions: 0Answers: 0
edited August 2012 in Feature requests
After reading this article http://www.html5rocks.com/en/tutorials/speed/animations/ I was curious how difficult it would be to implement this into the Scroller plugin? Would it improve the performance at all (specifically when scrolling triggers a "page change" the page seems to lock up for a fraction of a second).

I'd just like to know what (from Scroller) should be scoped inside the requestAnimationFrame call? The position calculations? The call to change pages in DataTables? Just the animation of the 'top' CSS property?

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    There is no animation in Scroller - it is all native scrolling, so I'm not sure that requestAnimationFrame would actually help here. The change in the 'top' property of the inner table is simply setting the value - no animation there.

    Debouncing the scroll events however, I think would help. Scroller actually does do this already, but only when server-side processing is being used for the DataTable. I think the correct thing to do is to generalise that ability and allow it to be enabled for client-side processing as well. Added to the list :-)

    Thanks for the suggestions!

    Regards,
    Allan
This discussion has been closed.