Chapter 40. Kevin

Kevin’s team was having trouble with a number of application features. Invoicing was at the top of his list. At his company’s web page, a customer could click to create an up-to-date invoice. On a good day, this online feature would create an invoice in about 40 seconds. Kevin’s team had never loved this level of performance, but it was their normal, and it was considered officially acceptable.

The problem was, over the span of a calendar month, this invoicing feature (and many others as well) would get slower and slower. By month-end, creating an invoice might take 300 seconds or more, which was intolerable.

Kevin invited us to look at his system in early December, so it would be a few weeks before we’d have a chance to catch an invoice creation in the act of being slow. But of course, we wouldn’t need to wait until month-end to trace a Create Invoice execution. Even if we couldn’t yet catch it in the act of running slowly, tracing early in the month would help in at least three ways:

Setting a baseline
Solving problems is easier if you can understand how the program you’re analyzing behaves when you’re happy with it.
Revealing waste
A profile shows whether a program is wasting any of its time. (Being fast doesn’t automatically imply being efficient.)
Starting the learning curve
If you’re not yet intimate with tracing, it’s better to learn how to do it now, while everything’s still calm.

Here’s the profile for a typical execution. This one took about 41 seconds: ...

Get How to Make Things Faster 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.