NUBIC/LatticeGrid — pull request #8 by jdzak (2014-07-07 16:51:53+00:00)
Title: Speed up org/org chart generation.

The org/org interaction chart slows as more organizations and abstracts are added. The FSM deployment had problems with the server hanging because of the memory needed to generate the chart.

This change speeds up the generation of the org/org interaction chart by using selecting only ids when possible and querying with join tables. More details:
1. Optimize OrganizationUnit#all_abstracts (pre: Unknown, post:49 seconds)
2. Optimize #graph_secondaryroot (pre: 165 seconds, post: 2 seconds)
* Use count for associations
* Optimize db queries