Huge refactor: improve perf of unread comments counts