var/icon/I1 = new /icon('icons.dmi')
I1.DrawBox("#ff0000", 0, 0, 16, 16)
var/icon/I2 = new /icon(I1)
new /icon(I1) would generate I1's entire DMI and use that to create I2. Now it instead only copies the queued operations. This massively improves its performance and memory usage (several GBs over /tg/ init, and more over the round).
In the following code:
new /icon(I1)
would generate I1's entire DMI and use that to createI2
. Now it instead only copies the queued operations. This massively improves its performance and memory usage (several GBs over /tg/ init, and more over the round).