This article describes several simple, yet effective techniques for optimizing Java ME applications. The problem of optimization is a very serious issue when developing mobile applications, as developers are limited in terms of the maximum jar size and system resources available. Despite the resource limitations of the mobile platform, developers often neglect to perform even simple optimizations. The article addresses two aspects of optimization, namely improving performance and reducing size (both of images and class files).
The article highlights several important areas where optimization is important. The discussion on the importance of ensuring that system callbacks return quickly and that application logic be kept out of the paint() method highlights a very common error. Useful advice is also given to help ensure constant frame-rates are achieved across different devices. The list of simple optimizations contains several tips that are highly useful and which can achieve surprisingly significant performance benefits in Java ME applications.
Useful advice is also provided regarding reducing .jar size and the memory required by images. While some of this advice (such as avoiding Object-Oriented Programming) may seem counter-intuitive, the resource limitations of mobile devices mean that such optimizations are essential. Optimization of PNG images, in particular, can help improve performance noticeably.
--Larry101 13:00, 12 September 2009 (UTC)