The CPU Sampler (Time Profiler) tells you where your program spends execution time. If your application is slow, this tool often helps you determine where the consumers of the problem time are, and (if you understand your program) how you can fix these problems.
Run this tool regularly to understand your programs, as well as the implementations behind the abstractions on which they depend - don't wait until a problem arises.
You can use the CPU sampler to record stop copies of your program streams. This is recorded at high frequency. The sampler displays information such as functions that take the most time and what percentage of the time they take. You can pay for libraries or functions for your subscribers, effectively choose the granularity you want, or hide what you cannot change. After you find the functions / methods you are interested in, you can view the source file in the Tools, and it will break what takes so long for you.
source share