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.

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: