Re: [android-developers] super slow code

2011-10-04 Thread Kostya Vasilyev
First, profile and find out which is the slow part (reading, tokenizing, string-to-float conversion). Second, conversion of string to float is ridiculously slow in some Java library versions (Android uses Apache Java libraries). This came up in the context of SVG parsing, IIRC, a few months ag

[android-developers] super slow code

2011-10-04 Thread bob
Does anyone know why this code is ridiculously slow and/or how to make it faster? float[] getVertices(String filename) { try { AssetManager am = this.getResources().getAssets(); InputStream is = am.open(filename);