Where it is slow is entirely down to old notifications as these are never pruned and if you've been following both of the Classifieds forums you could actually have thousands or tens of thousands of notifications.
What I could do is to add a "deleted notifications" thing.
This would only remove your old notifications, not affecting the things you are following... so you'd continue to get new notifications. But it would make the page load in milliseconds.
As an example, @hamrack today the following query takes 1.4 seconds, if I deleted just the notifications for "new items created in a forum you are following", the query would take 198 milliseconds.
On "following" performance.
I think it's about as fast as it is going to get.
Where it is slow is entirely down to old notifications as these are never pruned and if you've been following both of the Classifieds forums you could actually have thousands or tens of thousands of notifications.
What I could do is to add a "deleted notifications" thing.
This would only remove your old notifications, not affecting the things you are following... so you'd continue to get new notifications. But it would make the page load in milliseconds.
As an example, @hamrack today the following query takes 1.4 seconds, if I deleted just the notifications for "new items created in a forum you are following", the query would take 198 milliseconds.