FPS testing in android application

后端 未结 4 1298
梦如初夏
梦如初夏 2021-02-08 12:55

How can an android application developer test FPS (Frames per second) for their application? I\'m talking about general application, not game.

It can be on emulator or p

4条回答
  •  日久生厌
    2021-02-08 13:26

    As mention by Guykun and kcoppock, if you are only using the View widgets or Canvas you normally don't look for FPS to determine visual performance.

    As you don't mention what you are doing other than 'not a game' you may want to review how Android does drawing.

    http://developer.android.com/guide/topics/graphics/2d-graphics.html

    Most of the performance issues come from doing stuff on the UI thread. Use Strict Mode for finding problems.

    http://android-developers.blogspot.com/2010/12/new-gingerbread-api-strictmode.html

    Also use the tools to find performance hot spots:

    http://developer.android.com/guide/developing/debugging/debugging-tracing.html

    http://developer.android.com/guide/developing/debugging/debugging-ui.html

    [Edit August 2017: Google has improved the training documentation regarding performance]

    https://developer.android.com/training/best-performance.html

    And if you want more details of what's going on under the hood see the Google IO session on what they did for Hardware Accelerated Rendering

    http://www.youtube.com/watch?v=v9S5EO7CLjo

    [Post Google IO 2012 Update]

    For Jelly Bean, Google has done additional work on UI performance. See the Google IO 2012 session:

    http://www.youtube.com/watch?v=Q8m9sHdyXnE

提交回复
热议问题