I am a fan of MyTracks, and recently I am writing a static code analysis tool
to conduct performance analysis for Android apps. I found drawing object
creation in MyTracks's code. It could make UI appear sluggish.
As suggested by Android Developers,"Creating objects ahead of time is an
important optimization. Views are redrawn very frequently, and many drawing
objects require expensive initialization. Creating drawing objects within your
onDraw() method significantly reduces performance and can make your UI appear
sluggish."
We found the violations in this class:
com.google.android.apps.mytracks.ChartView
You may find more useful information in this references:
http://developer.android.com/training/custom-views/custom-drawing.html
Original issue reported on code.google.com by winson...@gmail.com on 24 Mar 2014 at 8:48
Original issue reported on code.google.com by
winson...@gmail.com
on 24 Mar 2014 at 8:48