almosr / android-svg-code-render

Convert SVG files into Java source and use it in your Android app
Apache License 2.0
24 stars 3 forks source link

Avoid any allocation in render method #60

Closed almosr closed 9 years ago

almosr commented 9 years ago

Lots of matrices and paths are allocated while the SVG file is drawn. Allocating any items in the render method might cause garbage collections and therefore lags in the app.

Avoid any allocation in the render method, introduce an init method which can be called before rendering and that method sets up all the required instances only once.