DirectEmployers/MyJobs — pull request #1041 by aspidites (2014-11-21 21:49:01+00:00)
Title: [ST-669] Fine-Tuned PRM response times

Earlier attempts reduced the number of SQL at the cost of higher response times. I spent all day finding the balance and found the reason for the number of queries to be related specifically to the fetching of tags. Luckily, the way we have things set up ensures that we only do a query for the number of partners on a page, rather than all of them. In summary:

* I cached query results so that if all we are doing is changing pages, we don't run the query again (no affect on tagging since different partners show up for each page)
* Stopped prefetching data, as that caused linear growth in response times correlating to the number of total partners a company has.
* Found a slightly more efficient (and cleaner) way to get all contact tags

The overall affect can be observed on my QC server. If you try and load Fluor's PRM, you should notice that it takes about a second, rather than nearly 4.