JakeWharton/Android-ViewPagerIndicator — pull request #233 by cmelchior (2013-06-16 16:29:44+00:00)
Title: TitlePageIndicator support for large datasets and CursorAdapters

The current TitlePageIndicator iterate over all entries in the adapter on each redraw and call getTitle() on each item. This is especially a problem if used with a CursorAdapter with many elements (ie. 100+) as the UI framerate drops considerably.

I have changed the implementation so the TitlePageIndicator now uses a sliding window over the data instead, making the indicator useful for large datasets. This means it at most calls getTitle() 5 times on each redraw.

I have also added extra menu options to the sample project, so it is now possible to add a large amount of items in order to stress test indicators.