As with any successful new product, along with stories of success came some bitter complaints. Some developers complained about architectural and philosophical issues. Others complained about bugs or the lack of a particular feature. However, the complaints I personally found most troubling were that programs written with JFC/Swing were slow.
I convinced my manager to let me spend a week looking into the performance issues with JFC/Swing, downloaded a trial copy of a profiling package, and started poking at different parts of the toolkit.
It turned out that there were several areas where we could improve performance relatively easily. At the end of the week I wrote a report on my findings and sent it to the rest of the Swing engineering team. Other members of the team got caught up in the spirit of performance tuning and began doing their own analyses. Over the next few months, I spent more and more of my time working on analysis and tuning and the Swing team made numerous performance enhancements. Many of the techniques described in this book are based on the knowledge we gained while tuning JFC/Swing.
In late 1998, we shipped a new version of JFC/Swing that was more than twice as fast for typical tasks than the previous release. However, while many developers were pleased with the improvements, we were troubled to see that we still received numerous complaints about performance. Clearly the problem was more complex than we first thought.
In an effort to better understand the performance issues we and our developers were facing, I spent (and continue to spend) a lot of time talking with developers working on serious, real-world Java technology-based systems. In late 1998, I joined the Performance Team in Sun's Java Software unit and worrying about performance issues became my full-time job.
Developers sometimes point out areas where changes in the libraries or VM could improve the performance of their programs. Part of my group's charter is to help make sure those changes, when appropriate, make their way into the core Runtime Environment.
As we work with developers, we often also find areas where changes to their program code can improve performance. We've found that there are a number of common mistakes and misconceptions about the performance characteristics of Java technologies and even about performance tuning in general.
The goal of this book is to share what we've learned about performance tuning Java technology-based systems with a wide audience. We hope that it will prove to be a valuable reference for you.
Steve Wilson