1

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.

  • The blue color is from 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).
  • The green color is something called dalvik/system/VMDebug.startGC ()V

My questions:

  1. Can I do something to make this drawBitmap less expensive ? (I would however like to keep all images on the screen)
  2. What is this VMDebug thing? Can't seem to find much about it via Google
PoeHaH
  • 1,936
  • 3
  • 28
  • 52
  • Have you found some hints relating to your question 1.? Having the same problem here... – avalancha Sep 20 '13 at 14:39
  • I didn't find any good answers to my problem. I decided to just let this one go. I guess bitmap drawing is just way more expensive than some of my other code. – PoeHaH Sep 21 '13 at 18:34

2 Answers2

0

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

gheese
  • 1,170
  • 1
  • 11
  • 17
  • But how can I optimize the bitmap drawing? It's done in android itself as I'm just working with XML layouts. Also: is this always taking so much time, or just now when I'm debugging? – PoeHaH Sep 08 '12 at 08:29
0

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.

More Details

Community
  • 1
  • 1
vrnithinkumar
  • 1,273
  • 1
  • 11
  • 29