Experiencing a strange phenomenon. My app is built around a vertical UIScrollView (i.e. "the feed") that is essentially an activity timeline much like Facebook's. When the user scrolls to the bottom, the feed can load older items in blocks of 20.
The first 0-20 items (default load) scroll fast and it continues to scroll fast when items 20-40 are added, but performance significantly degrades when items 40-60 are added and the app becomes essentially unusable when 60-80 are added.
What's extremely odd is the CPU usage during this entire scenario:
- 20 feed items (default): CPU 65%
- 40 feed items: CPU 40%, Thread 1 activity down about 25% (eyeballing)
- 60 feed items: CPU 18%, Thread 1 down 50% from previous
- 80 feed items: CPU 7%, Thread 1 down 50% from previous again
This is leading me to believe that the lack of performance is not the size of the scroll view but something else causing the CPU to disengage itself in some strange way. You'd expect CPU utilization to increase, not decrease.
I thought perhaps I was inadvertently adding the new feed items not on the main thread and somehow screwing it up, but that's not the case.
Any thoughts?
FYI (iPhone 5 running iOS8, app built with iOS 8 SDK, I don't think I was experiencing this when building with iOS 7 SDK running on iOS 7. Performance degraded, but, IIRC, predictably with UIScrollView size - I will attempt to confirm).
Update I just built and ran the app with both 7 SDK and 8 SDK on an iPhone 4S running iOS 7.0.6. It is not showing the same issue. ScrollView performance degrades more predictably and the CPU usage does not drop as the UIScrollView increases in size. Bug in iOS 8??