tgstation / dev-cycles-initiative

Hub for tracking issues in the Dev Cycles Initiative
1 stars 0 forks source link

airlock/update_other_id is stupid #22

Open Mothblocks opened 1 year ago

Mothblocks commented 1 year ago

This is called nearly 200 times unconfig'd and is 83ms.

/obj/machinery/door/airlock/proc/update_other_id()
    for(var/obj/machinery/door/airlock/Airlock in GLOB.airlocks)
        if(Airlock.closeOtherId == closeOtherId && Airlock != src)
            if(!(Airlock in close_others))
                close_others += Airlock
            if(!(src in Airlock.close_others))
                Airlock.close_others += src