Performance Bugs

Donald Knuth’s famous pronouncement that “premature optimization is the root of all evil”[27] should be etched in the mind of every professional software engineer. More bad code has been written in the misguided pursuit of efficiency than any other cause.

But that doesn’t mean that you can ignore efficiency. If your software is taking ten minutes to perform a task it should be performing in ten seconds, then you definitely have a problem.

Find the Bottleneck

As with any kind of bug, the key to solving a performance problem is identifying the root cause. And nine times out of ten, what that means is that you’re looking to find the bottleneck—the particular area of the code that is restricting overall performance.

In most ...

Get Debug It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.