Summary
In this chapter, I touched on two very different topics. First, I looked at responsive user interfaces and how to make them faster, and then I continued with the concept of caching. That topic was introduced with a simple example, followed by a fully featured cache implementation that you can use in your programs.
At the end, I returned to the example SlowCode
program from Chapter 1, About Performance. First, I used some detective work to find out what it really does, which allowed me to improve it a lot. The code now processes a million numbers in mere ms and not minutes as the original program did.
In the next chapter, I’ll continue pointing out that the best way to improve program speed is to use a better algorithm. Most programs need some way to effectively organize internal data, which makes this part a great candidate for optimization, and since we would rather use great existing code than reinvent a mediocre version, we’ll look into Spring for Delphi...