Scroller plugin is overwriting iDisplayLength.
Scroller plugin is overwriting iDisplayLength.
jcready
Posts: 44Questions: 0Answers: 0
I have between 50k-100k rows of data and the Scroller plugin is ignoring [code]"iDisplayLength": 500[/code]
On mobile devices the iDisplayLength gets overwritten to such small numbers that the table gets re-drawn after only scrolling a couple rows. Even when using Scroller on a 1680x1050 computer display, the plugin is still overwriting iDisplayLength to an incredibly small number. I don't want to bog the page down with 100k rows in the DOM, but I also don't want to see the FOUC every half second because the Scroller plugin decided 500 rows would consume too much memory. Instead, it overwrites my iDisplayLength to about 35 rows; forcing my browser to: remove, calculate, append and position a new table in the DOM 3 or 4 times for every scroll of my mouse wheel.
Like the rowHeight property, the iDisplayLength property should only be calculated/modified/set by the Scroller plugin if the property isn't already set or if it's set to 'auto'.
On mobile devices the iDisplayLength gets overwritten to such small numbers that the table gets re-drawn after only scrolling a couple rows. Even when using Scroller on a 1680x1050 computer display, the plugin is still overwriting iDisplayLength to an incredibly small number. I don't want to bog the page down with 100k rows in the DOM, but I also don't want to see the FOUC every half second because the Scroller plugin decided 500 rows would consume too much memory. Instead, it overwrites my iDisplayLength to about 35 rows; forcing my browser to: remove, calculate, append and position a new table in the DOM 3 or 4 times for every scroll of my mouse wheel.
Like the rowHeight property, the iDisplayLength property should only be calculated/modified/set by the Scroller plugin if the property isn't already set or if it's set to 'auto'.
This discussion has been closed.
Replies
Basically Scroller will set the display length to be 3 times the number of rows in the visible viewport. That obviously isn't enough in the case you are using. I plan to add an option to Scroller which will allow you to manipulate the row cache from the default of 3 to something much higher - say for example 50. This will be available in a future version of Scroller.
Allan
Allan, did you ever introduce a setting to do this? I am trying to find the same functionality.
Thanks!
George