gleue/TGLStackedViewController — pull request #17 by walsh2000 (2014-12-03 20:06:17+00:00)
Title: Performance tweaks

Hello

I was playing with your excellent code recently and found that if the _cards array is sufficiently large (> 200, I tested with 2500) the performance is unacceptable. I spent time debugging/profiling and found that the problem was that the views above (both in Stacked and Exposed layout) were still onscreen, so the OS fetched/rendered these items.

This pull request does two things:

1. In Stacked layout, it removes the pinning of the items which would have a negative y-offset to 0 y-offset (allowing them to scroll offscreen upward)

2. In Exposed layout, it reduces the number of cells that are onscreen to a small handful. A new property is introduced which allows developers to configure the number of collapsed cards which appear at the bottom of the exposed item.