Closed brafkind closed 9 years ago
My suggestion was: replacing "model.User.all()" with "db.Query(model.User, projection=('state'))" that way you don't load the whole user model.
The query needs to be changed to run as a server process, write its results, and the webhandler needs to just read the results.
A
On Mon, Sep 14, 2015 at 9:06 PM, Scott Shawcroft notifications@github.com wrote:
My suggestion was: replacing "model.User.all()" with "db.Query(model.User, projection=('state'))" that way you don't load the whole user model.
— Reply to this email directly or view it on GitHub https://github.com/Lessig2016/pledgeservice/pull/16#issuecomment-140244816 .
Speed up the loop that calculates pledge amounts per state per user by caching the set of all users outside the loop.