O'Reilly logo

Java EE 7 Performance Tuning and Optimization by Osama Oransa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Identifying potential performance issues

In the previous section, we diagnosed different hot spot areas and classified them into different types (either the method's self-time or the invocation count is high, or both). Now let's describe some examples of the potential root causes of these hot spots.

Algorithmic/logic issues

When the application logic is generally the root cause of the performance issue, there can be many variants such as unnecessary loops, underperforming algorithms, repeated calculations, and no caching.

If we look at our online shopping project, ExampleTwo, we see some samples of this ineffective application logic, shown as follows:

Product[] allProducts = catalogSessionBean.loadAllActiveProductCatalogByCriteria(new SearchCriteria()); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required