Yeah, the activity numbers can be pretty wrong. There is an older issue about this on codeberg: https://codeberg.org/rimu/pyfedi/issues/424
I haven't really dug into this issue yet, so I am not sure if the issue is that certain activities aren't marking users as active recently or that the db queries are somehow not counting users correctly. I suspect it is the former, that certain user actions (eg vote, comment, etc.) aren't then also marking that user as having been recently active.
@MrKaplan@piefed.world was in the matrix chat the other day talking about the changes. I think rimu already upstreamed most of them into the project (codeberg). It primarily consisted of creating indices to speed up queries and to do
COUNTqueries in a better way (codeberg).DB optimization remains an ever-ongoing thing, and sometimes things like the ORM used (sqlalchemy) kind of gets in the way of crafting efficient queries. So, as more and more people are making piefed accounts, and as talented sysadmins like on piefed.world are running instances, we are learning where things can get better.