You might be wondering what the chapter about optimization is doing way at the back of the book. Its placement here reflects our philosophy that optimization does not belong at the forefront of your mind when building your applications. This chapter describes the role of optimization, including when and how to apply it, and demonstrates some very practical techniques to get great performance improvements in the software you build. You'll be encouraged to keep your design clean and clear as the first order of business, and use hard facts to drive the optimization process. Armed with this knowledge, you will be able to measure your progress and identify when the optimization effort has stopped adding value.
In this chapter, you learn the following:
How optimization fits into the development process
What profiling is and how it works
How to profile an application using the standard Java virtual machine mechanism
How to profile an application using the free Java Memory Profiler tool
How to identify performance issues related to both the CPU and memory usage
How to achieve huge performance increases with small and strategic alterations to code
Optimization is an important part of software development, but not as important as you might think. We recommend that you take time to accumulate an awareness of the types of issues that affect performance in your particular programming environment, and keep them in mind as you code. For example, ...