Chapter 5
Learn to Optimize with the Profiler

The profiler gives you plenty of information with different reports and visualizations. To optimize, your job is to take all that information, make an educated guess on what might be slow, optimize that, reprofile, and see whether your guess was correct.

Profiling is always guesswork. There’s nothing deterministic except for the general routine of profile, guess, optimize, then profile again and repeat. Do not expect an ultimate profiler report that will magically tell you what’s slow. Every report or visualization is looking into your app’s performance from one specific angle. You might be able to see the problem from that angle, but most often you will not. Worse, miscounting and double counting obstruct the data even more.

So how do you profile then? Remember I told you that profiling is a craft. I can start you off by profiling our example app that we wrote in the previous section, but then you’ll have to go out in the wild and profile for yourself. With time, you’ll master this craft, and you’ll be able to see the real sources of performance problems. So let’s jump right in and optimize our example application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.173.53