CleverRaven/Cataclysm-DDA — pull request #10147 by kevingranade (2014-11-22 22:01:19+00:00)
Title: Speed up monster spawns.

This was scanning the entire list of despawned monsters on every submap load.
To reproduce the performance problem quickly, warp somewhere, spawn a bunch of monsters (LOTS), then warp away, possibly repeat a few times if you have a faster computer.
Then you'll find that when you walk around on that overmap, you get a distinct pause every 12 steps (if walking horizontally or vertically).

After this change it should clear up with the same overmap, even if you fill the entire overmap with zombies (I tested up to about 50,000 zombies on the overmap).