Removes the datum pool, as it is not performant.

* Creating new objects is cheap, in fact comparable to the cost of getting it out of the pool, so it doesn't help there.
* Placing items in the pool is far more expensive than letting them garbage collect due to the resetting of vars and such.
This commit is contained in:
Leshana
2017-05-04 01:58:33 -04:00
parent 3c9698c53d
commit 44ff1a70c6
55 changed files with 92 additions and 217 deletions
+4 -4
View File
@@ -97,7 +97,7 @@
if(iswirecutter(W))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), destroyed ? 1 : 2))
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
qdel(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
@@ -152,7 +152,7 @@
else if(!(W.flags & CONDUCT) || !shock(user, 70))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(src)
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
@@ -170,11 +170,11 @@
density = 0
destroyed = 1
update_icon()
PoolOrNew(/obj/item/stack/rods, get_turf(src))
new /obj/item/stack/rods(get_turf(src))
else
if(health <= -6)
PoolOrNew(/obj/item/stack/rods, get_turf(src))
new /obj/item/stack/rods(get_turf(src))
qdel(src)
return
return
+1 -1
View File
@@ -65,7 +65,7 @@
if(WT.welding == 1)
if(WT.remove_fuel(0, user))
user << "<span class='notice'>Slicing lattice joints ...</span>"
PoolOrNew(/obj/item/stack/rods, src.loc)
new /obj/item/stack/rods(src.loc)
qdel(src)
return
+3 -3
View File
@@ -182,13 +182,13 @@
spawn(50)
if(src && on)
ismist = 1
mymist = PoolOrNew(/obj/effect/mist,loc)
mymist = new /obj/effect/mist(loc)
else
ismist = 1
mymist = PoolOrNew(/obj/effect/mist,loc)
mymist = new /obj/effect/mist(loc)
else if(ismist)
ismist = 1
mymist = PoolOrNew(/obj/effect/mist,loc)
mymist = new /obj/effect/mist(loc)
spawn(250)
if(src && !on)
qdel(mymist)
+2 -2
View File
@@ -92,11 +92,11 @@
index = 0
while(index < 2)
new shardtype(loc) //todo pooling?
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
if(reinf) new /obj/item/stack/rods(loc)
index++
else
new shardtype(loc) //todo pooling?
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
if(reinf) new /obj/item/stack/rods(loc)
qdel(src)
return
@@ -35,7 +35,7 @@
/obj/effect/wingrille_spawn/proc/activate()
if(activated) return
if (!locate(/obj/structure/grille) in get_turf(src))
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
var/obj/structure/grille/G = new /obj/structure/grille(src.loc)
handle_grille_spawn(G)
var/list/neighbours = list()
for (var/dir in cardinal)
@@ -49,7 +49,7 @@
found_connection = 1
qdel(W)
if(!found_connection)
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
var/obj/structure/window/new_win = new win_path(src.loc)
new_win.set_dir(dir)
handle_window_spawn(new_win)
else