I've recently run a method tracing session on the process of opening a FragmentActivity that takes about 750-1000ms to open from the previous activity and has a ListView into which it loads its initial batch of data in times that vary from as low ("low") as 1500ms to as high as 5000ms. After sorting by "exclusive time", I noticed that a method named android.os.MessageQueue.next
is taking up the plurality of the time.
A view of all the main thread after a method tracing session. Notice android.os.MessageQueue.next
is first in the list:
Now, my question is as such: is this standard operating procedure in an Android app--that is, does android.os.MessageQueue.next
refer to the main queue waiting for another operation? Or, alternately, could this indicate some sort of temporary deadlock?
Should I be worried?
If you are using a handler thread hopefully something went wrong. I could see these lines in source code of MessageQueue's next method. Have a look it may help you to understand.
** Message next() { // Return here if the message loop has already quit and been disposed. // This can happen if the application tries to restart a looper after quit // which is not supported. **
Source code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With