Chapter 8. Size Does Matter: Optimizing J2ME Applications

IN THIS CHAPTER

Because of several computing and memory restrictions of mobile devices, you need to pay particular attention to the size and performance of J2ME applications.

The most important hint is probably to keep everything as simple as possible. If an application will be ported from the desktop, you may want to consider a re-implementation instead of trying to downsize the existing program until it fits into J2ME.

Although most optimization possibilities depend on the individual application, in this chapter we'll show you some general approaches and hints for saving resources. Unfortunately, there is often a tradeoff between execution speed and memory consumption. Thus, not all of our hints will make sense in all application scenarios.

Usually, memory in J2ME devices is divided into three different categories: program storage space, persistent memory, and heap memory. The heap memory is used at runtime only and holds all volatile objects. Depending on the device, there may be different limits on each of the types, making trade-off decisions even more complicated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset