PERF: skip existing users if large no of notifications expected (PR #9061)

We shouldn’t update default categories for existing users if large no. of notifications are expected.

GitHub

More details at https://meta.discourse.org/t/very-slow-sidekiq-issue-with-large-queue-due-to-massive-numbers-of-unread-user-notifications/140716/79?u=vinothkannans

This seems good to me. We should wait to merge though until stable is in a good place.

  MAX_NOTIFICATION_COUNT ||= 10000

This is a handy trick in case the case is re-evaluated for any reason.

sorry @vinothkannans I am closing this as a bit too risky, we have sat on this for quite a while and it churns through some very very critical code. I prefer to hold off on this risk.