Summary
In environments seen nowadays, it's very important to be able to profile an application to identify bottlenecks, especially at the processor and memory levels. Systems are complex and divided into several layers, so analyzing processor usage using call stacks can be really hard without some tools and visualization techniques, such as flame graphs. Overall, you should focus on your code quality before going for profiling.
As you saw in our example, a simple and effective solution for our server was to cache the results. Caching is a very important technique and is usually crucial in balancing resource usage. Normally, you have available memory and it's better to cache a result for a small period of time than to process it every time, specially ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access