Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Notifications.prune taking too long #999
Hmm I think its running 7pm est. Even with 650 users its taking 52 seconds, so it will be a huge problem on bigger forums.
Not really sure how the notification pruning works, I think it doesnt prune anything if they are not read? So if a user never logs in the notifications just keep increasing forever?
Yes. I'll be the first to admit that notifications need an overhaul.
Notification pruning works thusly:
Steps 2 and 3 are obviously the O(derp) part, because the more users there are, the longer it will take. Step 3 is, I believe, running
Instead, I think we should simpify the system: