ufkindle.blogg.se

Sencha touch documentation scroll bounces off
Sencha touch documentation scroll bounces off









sencha touch documentation scroll bounces off

The loadMore() in ion-infinite-scroll suggests that it will still only add but not remove records from the record array (right?) so the array just blows your memory as you scroll - or worse if you jump to very large offset. This is rather important when you have millions of records in the server and need to be able to allow the user to jump to any offset in that dataset. Now the bit I'm still missing is how do I get the collection to maintain a window of data from the server as the user scrolls down and up ? I understand that the DOM rows are recycled by collection-repeat as you scroll - but we need to only keep a slice of the data records in memory as well.

sencha touch documentation scroll bounces off

I see that Raymond Camdon has a nice tutorial on collection-repeat Some of these options and optimisations are a step ahead of Sencha. This will reduce the client side memory and avoid the "out of memory" scenario. It also needs to support server side loading when scrolling either forward (currently supported) or backwards (not yet supported). To support smooth scrolling this data window needs to be larger than the actual data displayed on the screen.

sencha touch documentation scroll bounces off

You could easily do this by adding an offset variable to your existing model and then treat the array as starting at this offset (defaulting the offset to 0 for backward compatibility). A more useful model would be to assume that the scrollable data is a sliding window of the larger dataset rather than assume it is always anchored to the start of the dataset. This would crash in your current implementation. In many business apps we need to allow uses to change to a large offset in the viewed dataset.

sencha touch documentation scroll bounces off

Ion-infinite-scroll assumes that an array containing all loaded data is sufficient but IMHO this model breaks because for datasets with large numbers of rows invariably we run out of memory. Currently it's the only outstanding reason why I can't yet convince my employer to switch to Ionic. I've recently migrated from several years coding Sencha Touch to Ionic and for the most part I'm preferring Ionic but for many business apps containing large numbers of database rows (we're talking 100,000 or more) this missing feature is a show stopper.











Sencha touch documentation scroll bounces off