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.