AnderWeb / android_packages_apps_Launcher

Android Launcher (almostNexus mod)
http://forum.xda-developers.com/showthread.php?t=645550
Other
321 stars 151 forks source link

Memory usage #8

Open AnderWeb opened 14 years ago

AnderWeb commented 14 years ago

Seems since 0.8 the memory usage has grown but i don't really know why. Most of the FC repports i get from google developer console and people logcats are related to the longpress code over widgets or icons. (Code inside DragLayer.java)

Longpressing an item creates a Bitmap from the drawing cache of the item, some items are too big (like 4x4 widgets) so generating the drawing cache uses a lot of memory plus the bitmap copy created on line 209....

Anyways, as a result of the overall memory usage increased (i need someone who help me tracking allocations....) sometimes the pointed code fails not being able to create the drawing cache and fires a NPE.

I'm thinking on creating a fallback to making a plain square drawable when the drawing cache cannot be generated....