[英]android traceview
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. 我制作了一个应用程序,我想看看是否可以通过在特定活动及其后台任务上运行traceview来提高性能。
This link points to an image from traceview. 该链接指向 traceview中的图像。 As you can see there are 2 colors that are taking the most time + processor.
如您所见,有2种颜色占用最多的时间+处理器。
drawBitmap
. 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
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 VMDebug是dalvik调试监视器,调用startGC()函数启动垃圾回收
1) Try this answer to make drawBitmap less expensive 1) 尝试使用此答案以使drawBitmap更加便宜
2)VM-specific debug features. 2)特定于VM的调试功能。 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.
在Android平台上,推荐的访问此功能的方法是通过android.os.Debug类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.