O'Reilly logo

Take My Money by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Speeding Up Performance and Data Preparation

One problem with running reports is that they tend to want to use a lot of data, which becomes increasingly problematic over time as more and more data is accumulated. The two CSV generators we’ve looked at are naive interpretations that will absolutely not scale. Slow-running reports can lead to excessive server load, which can even crowd out regular users. (For example, I’ve worked on an app where I could see in the New Relic response graph when the administrator was running reports.)

A few strategies can be employed to speed up reports: do less work at once, do work in the database, and don’t duplicate work. These will work on any code, but reports are particularly data-intensive.

Use ActiveRecord ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required