Chapter 16. Basic performance enhancements
This chapter covers
- Implementing pagination for resources with the Kaminari gem
- Improving database query speeds with Active Record features
- Caching pages and fragments of pages
- Using the Delayed Job gem with background workers
When an application is written, it may be done in such a way that it will not perform ideally. A common situation is that an application with a small database will perform quickly because there is less data to retrieve, but starts to slow as the database grows larger. This problem can be fixed in many different ways.
The first way is to limit the amount of data retrieved in any one call to a fixed limit, a process known as pagination. At the moment, for example, you’re not ...
Get Rails 3 in Action 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.