sigmike/peer4commit — pull request #18 by mickzzz (2014-02-21 18:01:50+00:00)
Title: Eager load deposits and tips for Projects

Projects #available_amount internally calls #tips and #deposits for a project. This leads to total 2*n + 1 queries for each batch in Project.update_cache.

Eager Loading :tips and :deposits reduces this to 3 queries for each batch of 1000 projects.