Traceview: http://developer.android.com/guide/developing/debugging/debugging-tracing.html
On Tue, Oct 4, 2011 at 4:27 PM, bob <b...@coolgroups.com> wrote: > What tool do people typically use to profile on Android? > > Thanks. > > > > On Oct 4, 11:56 am, Kostya Vasilyev <kmans...@gmail.com> wrote: >> 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 ago, search this group's >> archives. >> >> -- Kostya >> >> 04.10.2011 20:42, 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); >> > BufferedInputStream bis = new BufferedInputStream(is); >> > Scanner s = new Scanner(bis); >> > long numfloats = s.nextLong(); >> > float[] f = new float[(int) numfloats]; >> > for (int ctr = 0; ctr< f.length; ctr++) { >> > f[ctr] = s.nextFloat(); >> > } >> > return f; >> >> > } catch (IOException e) { >> > e.printStackTrace(); >> > return null; >> > } >> >> > } >> >> -- >> Kostya Vasilyev > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en