Sep 14, 2018

The profiler will give you the tools to find which portion of the code is actually slow and how long it is taking.

Some profilers are VisualVM (free) and JProfiler.