i am trying to debug why my spring boot application takes around 200-ms to respond to an API, and for subsequent hits of same API it takes around 10-ms.
no caching is involved in API.
I am using VisualVM
and seems there is a CPU spike only for first time and no spike is observed for subsequent hits.
How can i get to know which functions took most time/intensive when i made the first API call.
Update: Why are Spring Rest services slow on the first request?