Meaning of Choreographer Messages in Logcat

Meaning of Choreographer messages in Logcat

Choreographer lets apps to connect themselves to the vsync, and properly time things to improve performance.

Android view animations internally uses Choreographer for the same purpose: to properly time the animations and possibly improve performance.

Since Choreographer is told about every vsync events, it can tell if one of the Runnables passed along by the Choreographer.post* apis doesn't finish in one frame's time, causing frames to be skipped.

In my understanding Choreographer can only detect the frame skipping. It has no way of telling why this happens.

The message "The application may be doing too much work on its main thread." could be misleading.

Why logcat showing this?

Are you running your application on emulator.I guess you increase the Memory allocated to your AVD might remove this warning!!..I face similar issues when my device emulator is allocated less memory

Choreographer skipped frames! How many is too many?


how many skipped frames is too many?

1 is too many, according to some.

Is there any kind of guidance (official or from experience) to say that about 50 is too much and less is ok?

50 would be rather bad. At 16ms per frame, that is 800ms that your UI is frozen. Users have a good chance of noticing this (e.g., they try tapping on a button and there is no visual response).

The more animated your UI is, the more likely it is that users will notice dropped frames. Dropping a frame on a fairly static UI may not be noticed; dropping a frame while the user is scrolling a ListView is more likely to be noticed. How sensitive users are to dropped frames varies by the user.

Maybe I should not really worry about performance based just on this message?

IMHO, you should.

Logcat: Skipped 33 frames

The message you are getting is a system log. It happens two reasons(as I know).

  1. When your application is doing too much work on it main/UI thread. To prevent it you should do time consuming works like database query and network operations in a separate thread and post its result to the main thread.
  2. If the system you are running on is slow(low RAM/ slow processor). Emulator is prime example of this problem. Also note that custom ROM's like cynogen and chinese android mobiles also tend to throw this error. They post a whole lot of logcat than nexus.


Related Topics



Leave a reply



Submit