Chapter 10: Performance Tuning

Team-Fly

Overview

MIDP is a small platform. The processor on the MID will probably be much slower than a typical desktop computer processor, and the available memory will be much smaller also. Making your application run fast and lean is important. You'll need to use memory sparingly, make your application run fast enough to be easily usable, and structure it so that the code itself is as small as it can be.

This chapter describes simple methods for benchmarking your existing code. It then goes on to describe various optimizations that can make your code run faster or use less memory. Common sense will take you a long way, but this chapter is devoted to giving you the basic techniques for optimizing your application.

The important rule of thumb is this: only optimize where it's needed. Said another way: if it ain't broke, don't fix it. I suggest that your first pass at coding your application should concentrate on cleanliness and maintainability. If there are performance problems, identify them and begin optimizing. You shouldn't be optimizing code as you write it-that's just likely to result in hard-to-read, hard-to-maintain code. Write first, then test, then optimize.


Team-Fly


Wireless Java. Developing with J2ME
ColdFusion MX Professional Projects
ISBN: 1590590775
EAN: 2147483647
Year: 2000
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net