Stopped reloading 10 channels every time someone checks their loyalty score
The surveillance system was fetching all messages from all 10 channels on every single /bigbrother-loyalty call. That meant a ~50 second wait every time. Not great when Big Brother is supposed to feel instant and omniscient.
The fix: the bot now keeps a local JSON file of all messages. When someone requests their score, it only fetches messages newer than the newest one already saved, then deletes anything older than 7 days to keep the file lean. On top of that, a cron job rewrites the whole file once a day so it never drifts out of sync.
Score lookups that took a minute now finish in a couple seconds. The panopticon is finally fast enough to be scary.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.