We combine the two loops into one, so that we can check our flags before creating the UserMessageList object. And we lift a few calculations out of the loop. For 8k users, with 95% long-term-idle, this was about a 10x speedup for me. (~30ms -> 3ms)