Bukkit/Bukkit — pull request #1093 by unon1100 (2014-08-04 01:18:47+00:00)
Title: [B] /deop <tab> no longer crashes large servers. Fixes BUKKIT-5742

If you are on a large server, and you press when doing the first argument of /deop, it can crash large servers.
This is a result of calling the method getOfflinePlayers, which is not an appropriate method to be calling. getOperators makes much more sense as it is a much smaller Collection. The only downside is that because it is a Set rather than a list, iterating through it is a small bit slower than iterating through a List of the same size, but iterating through a Set of maybe 10 people is much more efficient than iterating through a list of a few thousand.

Proof of concept: http://pastebin.com/35yFbfz9

This increases efficiency by a very large amount.