I made an application and I wanted to see if I can improve performance by running a traceview on a certain activity + it's background tasks.
This link points to an image from traceview. As you can see there are 2 colors that are taking the most time + processor.
drawBitmap
. (I use a header logo, a repeating header background and another background that repeats over the whole screen, all described in XML layout file). dalvik/system/VMDebug.startGC ()V
My questions:
It sounds like you may be able to optimize your bitmap drawing,(you mention a background that is drawn repeatedly)
VMDebug is the dalvik debug monitor the startGC() function is called to start garbage collection
1) Try this answer to make drawBitmap less expensive
2)VM-specific debug features. Though this class and many of its members are public, this class is meant to be wrapped in a more friendly way for use by application developers. On the Android platform, the recommended way to access this functionality is through the class android.os.Debug.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.