What is performance?
To better understand what we mean when we say that a program is performing well, let’s take a look at a user story. In this book, we will use a fictitious person, namely Mr. Smith, chief of the Antarctica Department of Forestry. Mr. Smith is stationed in McMurdo Base, Antarctica, and he doesn’t have much real work to do. He has already mapped all the forests in the vicinity of the station, and half of the year, it is too dark to be walking around and counting trees, anyway. That’s why he spends most of his time behind a computer. And that’s also why he is very grumpy when his programs are not performing well.
Some days, he writes long documents analyzing the state of forests in Antarctica. When he is doing that, he wants the document editor to perform well. By that, he actually means that the editor should work fast enough so that he doesn’t feel any delay (or lag, as we call the delay when dealing with user input) while typing...