|
|
|
|
How to reduce the loading time of a midlet?
Posted:
Jul 3, 2008 10:56 PM
|
|
|
Hi fellows, When I porting PhoneMe Feature,I find that it takes too much time to load a midlet.
I use slavemode and javacall layer to port.
I found that starting JVM itself does not take too much time.But when loading the midlet related classes and resources, it takes too many seconds.
If I don't load all components' png files in SkinResource.jpp's getImage,it saves some seconds(yes, after that ,the UI looks ugly ), but I hope it can be faster .
I guess it maybe because the time slice of the midlet is too small, and Scheduler::time_slice is called too frequently.If I add more millionseconds to one time_slice, It will faster nor not? I hope to have a try, but I cannot find where to change the value.
Is there anyone can tell me where to change the code ? Or some other ways to speed up the loading?
Thx very much.
Message was edited by: yaxch
|
|
|
|
|
|
|
Re: How to reduce the loading time of a midlet?
Posted:
Jul 4, 2008 12:20 AM
in response to: yaxch
|
|
|
yaxch,
phoneME Feature has gone through quite some optimization for improving start-up time. Have you had a look at the commercial SJWC documentation? There is a section on performance, you might want to check it out:
http://java.sun.com/javame/reference/docs/sjwc-2.0-web/docs/PortingGuide-html/index.html
Furthermore, we have found that poor start-up performance is often related to the MIDlet itself. General best design practices indicate that you should do late initialization in the MIDlet start-up, spread out time-consuming tasks, and pre-process resources (such as images) during build time, if possible. Observing such guidelines can reduce the perceived start-up up a MIDlet dramatically without any VM tweaks.
-- Terrence
|
|
|
|
|
|
|
|
Re: How to reduce the loading time of a midlet?
Posted:
Jul 4, 2008 12:38 AM
in response to: terrencebarr
|
|
|
Thanks very much. Yes, I know some Midlets maybe load too many resources. But when it's very slowly (about 7~8 seconds) when I load Javabenchmark2. I will read the document first.
|
|
|
|
|