Chapter 31. Event Duration
Remember, there are only two ways to improve the response time of a computer program: (1) reduce a profile component’s event count or (2) reduce a profile component’s mean duration per event. In this chapter, I will tell you about the second way: reducing the duration.
In the tomato story I told earlier, you had to know something about the price of tomatoes—specifically, that $12.90 per pound was absurd—to make the final optimization to that shopping trip:
It’s like that with computer optimization, too. The Payroll story is a good example. Jeff “knew the price of tomatoes” in that engagement. He recognized that a network round-trip duration of 10 milliseconds was excessive for two processes running on the same computer. At the time, I didn’t know how much a network round trip like that was supposed to cost. Would you?
Since that day, I’ve wondered out loud whether I’d have ever found the problem had Jeff not been there. Jeff argues, charitably, that I would have. He’s probably right. The profile proved that the only way to make PYUGEN meaningfully faster was to improve either the “SQL*Net” call counts or their durations. Changing the round-trip call counts was not an option because it was Oracle’s code, and we had no way to change it.
But that’s OK. The call counts probably weren’t a problem, because Payroll users at other companies weren’t complaining. ...
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