A post by LummoxJR made me realize that something similar to what I was attempting with my RefSortedList is already hard coded into BYOND with associative lists. I updated my Region library to use them rather than standard lists and got a massive performance boost which should make it run much much better on large areas and even a good performance boost on smaller ones.
http://www.byond.com/developer/Theodis/Region
ID:53615
Jan 28 2009, 7:17 pm
|
|
Entered(atom/movable/a)if(ismob(a))
var/mob/M=a
if(M.curicon!=icon)
ClearMap()
var/Region/r = new(a.loc, /proc/AccessibleTurfs)
for(var/turf/t in r.contents)
t.icon = 'red.dmi'
M.curicon=icon
return 1
mob/var/curicon
EDIT: Okay so DM doesn't work, but you get the gist.