This could certainly be optimized. All you care about is users of visible projects, but here you load *all* users in redmine database and then perform a calculation on it, then load it in a big Hash. If we just take our redmine installation today it's 865 users, and tomorrow it could well be beyond 2k or 3k. For me that's a blocker for this pull request, unless it's heavily cached or optimized. I'd prefer optimization in this case, we can talk about it next week.