|
|
|
Back to newsletter 140 contents
Every performance professional is familiar with the Knuth quote "premature optimization is the root of all evil". Many people now have a tendency to leave optimization to late in the project, which can be a valid choice - if it's not too late! But there are some early optimizations that aren't premature. If you are going to be using a lot of intensive storage I/O, it's not premature to decide early on that you'll need to have quick access storage (fast local disks or SSD) close to the application - and definitely not remote! Or to consider whether you can implement your persistent storage using in-memory storage with journaling.
If you are going to be distributing your application, it's not premature to avoid finely distributing the application. You only want to distribute at the component level, not at the object level, and you want to build that in as early as possible. It's not premature to avoid chatty protocols - your application-level network communications should require fewer roundtrips rather than many, every additional network roundtrip is always going to be a significant latency hit. If you know you are building a CPU intensive application component, it's not premature to build from the start the ability to run the component across multiple cores.
There are many optimizations that are not premature. Knuth's quote was actually about coding and the balance between maintaining readability vs maximum speed - readability is almost always preferable because code-level speedups often don't improve the speed of the application much, as most code isn't used much; whereas unreadable code is hugely expensive to maintain. At the design and architecture level, the quote does not apply - at these levels, you need to consider the application's use of resources in detail.
At the design and architecture level, optimization is seldom premature.
Now on to all our usual links to Java performance tools, news, articles and, as ever, all the extracted tips from all of this month's referenced articles.
Java performance related news.
Java performance related tools.
Back to newsletter 140 contents