GW2Raidar / gw2raidar

A log parsing website for Guild Wars 2 combat logs
http://www.gw2raidar.com
GNU General Public License v3.0
20 stars 14 forks source link

Improvements to Restat: Only recalculate what's needed #341

Closed Lego6245 closed 5 years ago

Lego6245 commented 5 years ago

Right now, for both areas and for users, if a single new log gets uploaded, the entire set of users and the entire set of areas gets recalculated, even though only the values associated with those logs could feasibly change.

This change makes it so that in the incremental case, we short circuit and only recalculate areas and users who we know have changed

Furthermore, we optimize the user case by updating their stat collection instead of re-calculating it from scratch each time. This has the current downside that a users stats wont update until a log containing their linked account is uploaded, but, currently that's a problem anyway (new users won't see stats until ~24 hours after they join). This can be solved by calculating a user's stats as part of sign up, once user stat calculation is changed to be dynamic/on demand instead of done as part of restat.

merforga commented 5 years ago

Sounds good. Can you push the changes to UAT so we can both do some testing? I believe there should be W7 log changes included as well from my commit previously