I saw on a article this statement:
Developers love to optimize code and with good reason. It is so
satisfying and fun. But knowing when to optimize is far more
important. Unfortunately, developers generally have horrible intuition
about where the performance problems in an application will actually
be.
Im looking for how can a developper avoid that bad intuition, is there some realy good tools to find which parts of your code realy need optimization (for java) , and if you now of some articles, tips or good reads on this subject.
thanks .
First thing is to have a global vision of the system that is being implemented. A lot of premature optimization occurs when programmers look at the problem from a narrow perspective. For example, implementing security in specific areas instead of building security as a global concern for the application. So stress needs to be in program design than just plain coding. Peer programming with right candidates can help improve this situation.
As far as tools go,
We had used the built-in Netbeans profiler and that was very useful in finding classes that needs to be re-visited in terms of performance/optimization.
An excellent example that helped us is here