I have an activity which has some text views and other data to be updated every second.
The performance is sluggish and when i capture the logs and view in TraceView.
I see at lot of calls been made to ViewRoot.draw() function.
25 calls in a short span of 4 seconds, almost 6 calls every sec.
Ideally speaking it should be once call every sec.
As per my initial speculation i beleive it is due to the bad layout of my xml, is this true?
How do i identify what is the reason for so many calls?
which is the best way to reduce these calls?
If these TextViews have their layout_width set to WRAP_CONTENT, then changing the text will trigger a measurement pass as their size will have changed. That could certainly get expensive. Try making them fixed-width.