The Source for Java Technology Collaboration

Home » java.net Forums » Phone ME » PhoneME Developer

Thread: How to reduce the loading time of a midlet?

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 2 - Last Post: Jul 4, 2008 12:38 AM by: yaxch Threads: [ Previous | Next ]
yaxch

Posts: 2
How to reduce the loading time of a midlet?
Posted: Jul 3, 2008 10:56 PM
 
  Click to reply to this thread Reply

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

terrencebarr

Posts: 544
Re: How to reduce the loading time of a midlet?
Posted: Jul 4, 2008 12:20 AM   in response to: yaxch
 
  Click to reply to this thread Reply

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

yaxch

Posts: 2
Re: How to reduce the loading time of a midlet?
Posted: Jul 4, 2008 12:38 AM   in response to: terrencebarr
 
  Click to reply to this thread Reply

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.




 XML java.net RSS