Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Java Technology : Education - online courses
J2ME: Step by step
Download tutorial zip fileView letter-sized PDF fileView A4-sized PDF fileE-mail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPreviousNext
3. Developing J2ME applications
  


Performance considerations page 4 of 6


Code for performance. Here are some ways to code with the aim to achieve the best performance:

  • Use local variables. It is quicker to access local variables than to access class members.

  • Avoid string concatenation. String concatenation decreases performance and can increase the application's peak memory usage.

  • Use threads and avoid synchronization. Any operation that takes more than 1/10 of a second to run requires a separate thread. Avoiding synchronization can increase performance as well.

  • Separate the model using the model-view-controller (MVC). MVC separates the logic from the code that controls the presentation.

Main menuSection menuGive feedback on this tutorialPreviousNext
PrivacyLegalContact