Stanford-Online/class2go — pull request #865 by halawa (2012-09-27 22:36:54+00:00)
Title: Halawa optim reports

@jbau, can you code review? The changes include a refactor of report code. Basically a whole file's of code being replaced for the files in /courses/reports/generation, and a bunch of files deleted (/courses/reports/data_aggregation). The main theme of the change was:
1- To factor the report write-out to a separate class (C2GReportWriter)
2- To make the code more memory efficient by writing report content out sooner and getting rid of data no longer needed.
3- Using Dj QuerySet values_list method to fetch required data into memory then process lists rather than query sets, which turns out to be about 2 orders of magnitude more efficient.

2 commits:
c1631e828391d505d5b1e44f1e0f39e0f0af978a Removed restriction on start date in gen_active_reports. Now reports start generated for a course once it is created.

62399b7cf976e553be041f2b46e3e1d70e735f7b Optimizes report generation performance and re-enables generation of course quizzes report in gen_active_course_reports