July 2021
Intermediate to advanced
434 pages
8h 36m
English
Optimization is often not needed in Ruby, but when it is needed, it should be approached in a principled manner, lest you waste time optimizing the wrong code. Nobody likes slow code, but there is a reason that premature optimization is considered the root of all evil.
In this chapter, you'll learn the importance of profiling in order to decide what to optimize, how the best optimization is deleting code or delaying the execution of code, and what to do when it looks like all parts of your application are slow.
We will cover the following topics in this chapter: