Closed morisy closed 10 years ago
We're averaging history entries as we go back in time. See comment at https://github.com/HabitRPG/habitrpg-shared/blob/master/script/algos.coffee#L431tL436 , and see https://github.com/HabitRPG/habitrpg/issues/1499#issuecomment-27832315 for some background on why. So it is indeed due to technical constraints. In the future, we may add keeping all history entries in the database, but only sending the preened entries on user.toJSON()
to save performance, but pretty low prio with everything else going on right now, so will likely be back-burnered at present
Extra info on ^ , a concern about performing preen on user.toJSON
for all responses, instead of "destructively" on cron
is that it is a very costly operation, and it could slow down most ops that return the user object pretty heavily. Will revisit in the future though for a more effective approach.
Thanks! Figured it was along those lines, but couldn't find the answer in other issues. Thanks for the pointer to it.
Noticed this with the CSV export, but appears to be true in general: Historical habit data appears to be condensed to a monthly summary rather than individual ups/downs over the lifetime of usage.
I've been using the HRPG to track, for example, how much water/caffeine I drink per day, but now data that goes back more than a month is lost.
Not sure if this is a bug or intentional given technology constraints, but would be super useful to have this data around and saved on the site for quick analysis. I was able to throw everything into a spreadsheet and see how I was doing on cutting back on caffeine this month, for example, with just a few quick clicks, and I think it could greatly increase the types of quantified self geekery folks can use HRPG for.