Bukkit/CraftBukkit — pull request #501 by Nephyrin (2011-10-11 04:03:11+00:00)
Title: Don't limit NextTick processing when far behind

Severely lagged servers, or servers using a plugin to make large amounts of changes, will easily balloon this list into the millions. Allow the server to catchup at this point, rather than falling massively behind.

This condition can be triggered by plugins making large amounts of changes rapidly, such as generating land. Once the list is in the 4-million range I timed it at 32 minutes of idle time for the server to catch up. A minor lag spike is preferable, in that case, to ballooning memory to arbitrary sizes. (and in my tests, this lag spike is 1s long)