Instead of relying on getline on an ifstream, read the entire stream into memory first.
Attempt based on this info found by mnguyen:
http://www.cygwin.com/ml/cygwin/2003-06/msg01229.html
Haven't stopwatched it yet on the psp, will post the results shortly...
app launch optimization(?)
app launch optimization(?)
- Attachments
-
[The extension zip has been deactivated and can no longer be displayed.]
Re: app launch optimization(?)
So, just to report back, this shaved approx 3-4 seconds during the card loading on my psp. I'll probably look around to see if there's other instances where we can apply the same optimization.
Cheers
Cheers
Re: app launch optimization(?)
I was expecting a huge change in the code, which is definitely not the case. This is actually what I wanted to do from the beginning, and how I expected getLine would work (I was foolishly thinking it was actually reading a good part of the file internally then handling it correctly through getline).
Will test this tonight, if it works correctly on my tests, this goes into the release.
Thanks!
Note: historically I was using C and a huge char* buffer for reading the card files. When I switched to getLine I was disappointed by the speed...probably because I did it incorrectly
Will test this tonight, if it works correctly on my tests, this goes into the release.
Thanks!
Note: historically I was using C and a huge char* buffer for reading the card files. When I switched to getLine I was disappointed by the speed...probably because I did it incorrectly
Re: app launch optimization(?)
I've applied the optimization to the other parts of the app and things seem a little snappier all around.