04-17-2009 11:52 AM
I'm working on a custom FileExplorer based on JDE's File Explorer Demo. This application opens a folder and displays all the items (folders or files) contained in it. For each element I need to use some extra info (not only url) so I have to open connections to filesystem for each one.
Testing it on real devices, there is a gap of performance between new models (bold, storm) and older ones, like 8300 series, perhaps due to CPU. I have measured times on 8300 and sometimes it gets 200 to 400 ms to open connections to items and read some properties. As result, opening a folder containing several files takes a long time. I have tested File Explorer Demo as well, and it seems faster because it doesn't have to recursively open items, but still it is slow compared to native Blackberry FileExplorer (probably written in c++).
I'd like to optimize the code, but I dont't know really how to do it.
04-27-2009 02:39 PM
The BlackBerry Bold, BlackBerry Storm and BlackBerry Curve 8900 do have faster CPUs than older generation BlackBerry handhelds (i.e. 8300 and 8100). So it is expected to see performance differences there.
I recommend using the profiler tool within the BlackBerry JDE. This can help you to pinpoint the methods you are using that are consuming the most CPU time. This could help you to eliminate the use of some expensive methods or move them to a background process.
04-27-2009 02:57 PM - edited 04-27-2009 03:01 PM
my suggestion is, that you should not create the extended file connection in the "list" part the code - do it on the render time of the list (that's the moment when you need the real data)... I had similar issues during the development of BBFileScout ( http://bb.emacf1.com/bbfilescout.html )...
04-30-2009 05:22 AM