[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-29 Thread Glen Kimsey
Thanks to everyone for the help on this. As I mentioned, I'm rather new to Java, so things like StringTokenizer being legacy are news. Believe it or not the file format uses actual frames instead of keyframes (hence no timestamp or other indication of time or frames between each being parsed

[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-24 Thread Kaj Bjurman
Is there a reason to why you use a LineNumberReader? I would instead use a BufferedReader, that will probably improve your performance. I don't know anything about the dataformat in the file, but there probably is a much faster way to parse it than using all those StringTokenizers (or regexp even

[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-23 Thread Glen Kimsey
Thanks for the reply. I think your suggestion of going binary is one of the better ones I had considered. Especially because I can avoid the parseFloat() calls altogether using this method. As for the quaternion vs axis/angle, I had thought I HAD to translate them originally (I found out later

[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-23 Thread Glen Kimsey
Fadden, Sorry, I missed your reply when I responded to Bart! I tried to find significant ways that I could avoid allocation, but the StringTokenizer is the main thing that I'm calling 'new' on and I didn't see any way to avoid doing that for every line. Your suggestion of using regexs for a

[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-23 Thread fadden
On Sep 23, 8:49 am, Glen Kimsey gkim...@gmail.com wrote: I tried to find significant ways that I could avoid allocation, but the StringTokenizer is the main thing that I'm calling 'new' on and I didn't see any way to avoid doing that for every line.  Your suggestion of using regexs for a

[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-23 Thread a1
Hi, As for the quaternion vs axis/angle, I had thought I HAD to translate them originally (I found out later with more research that I just had to use the more complicated matrix math rather than simple glrotate and gltranslate calls if I didn't).  I don't suppose you could direct me to a

[android-beginners] Re: Poor performance on my file loader (code optimization help!)

2009-09-21 Thread fadden
On Sep 20, 11:28 am, Glen Kimsey gkim...@gmail.com wrote: The loading process on a sample (1000+ line) file is abysmally slow (more than 4 minutes). [...] Some possible causes for the slowness: - Extensive use of parseFloat() - Creating new StringTokenizer for every line - Inefficiencies