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.
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.