Using del() on an image acts like a hard object delete, with a metric ton of overhead. When checking the images list of connected clients for the image and getting rid of it, then checking the refcount before the heavier check would almost always save a lot of overhead.
Numbered Steps to Reproduce Problem:
1) del(image)
2) CPU cries.
Code Snippet (if applicable) to Reproduce Problem:
del(my_image) // WHY GOD?
Expected Results:
del(image) should get rid of the image from the various client.images lists it belongs to, if it has a refcount after that, it needs to do a bigger delete (stored in a list/var somewhere)
Actual Results:
It scans everything in the world for this image in every variable it has, not good, not good at all, especially for an image that's JUST an image and not being cached in a list/var or visible via the images list.
Does the problem occur:
Every time? Or how often? Since the dawn of images.
In other games? Sadly, if you're using del(image) you're probably programming your game wrong. NOT FOR LONG BUDDY
In other user accounts? Yep
On other computers? Since 2000, yo.
When does the problem NOT occur?
Manually wipe the images out of the images list of connected clients, let the GC eat it.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
See above.