Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

best method for testing smoothness #204

geoffmacd opened this issue Jan 7, 2015 · 1 comment

best method for testing smoothness #204

geoffmacd opened this issue Jan 7, 2015 · 1 comment


Copy link

@geoffmacd geoffmacd commented Jan 7, 2015

Hey all,

I'm am currently investigating using AsyncDisplayKit with ASCollectionView. I want to benchmark my best effort with both the conventional approach and ASCollectionView. I imagine FB has performed various benchmarks over the course of this project and was hoping to gain some insight as to the best approach toy validate smoothness.

The core animation instrument is not very useful. It only records FPS every second whereas I would like to know how what was happening every time a frame was dropped. My current approach is to autoscroll the collection view with a recursive function and setContentOffset:animated to eliminate human error. Then use the CA tool and just ensure the FPS is higher in the async case while ensuring the main thread activity is lower. In my sync case, the main thread is 94 % running time while the async main thread running time is 24%. I know that the system will not draw at 60 FPS if it does not have to so I don't know if I am really dropping frames. There must be a cleaner approach than this.


Copy link

@appleguy appleguy commented Jun 15, 2015

@geoffmacd This is a good question and I wanted to answer it when I first saw it submitted way back in January — sorry I never got around to it!

The mechanism I've used is as simple as manually profiling your app (Time Profiler in Instruments). Then look for time on the main thread. Any time over about 10ms, especially if you know it will happen within a single runloop (e.g. call stack growing and then collapsing back to the base) will cause frame drops for scrolling, gestures, and physics-simulating animations.

The FPS measurement is not very useful because you may be holding a pretty high average FPS, but then drop a bunch of frames together; or only drop one frame per second, but it still feels bad. Basically FPS measurement does not correlate well with the human perception of the user experience.

Please feel free to post a topic on our Google Group for any further questions or discussion — I'd love to help!!forum/asyncdisplaykit

@appleguy appleguy closed this Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants