navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not allocate objects in onDraw. It reduce drawing system performance!

nkuznetsow opened this issue · comments

For example in com.gc.materialdesign.views.Slider class onDraw you call new Paint() and Color.parseColor("B0B0B0"). It creates many objects that may be reused in future, but you not reuse them.

Screenshot from allocation tracker is here: http://imagy.me/dl020prtbo

allocation tracker