mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 10:32:40 +00:00
Sped up the /proc/powernet_nextlink() proc.
Profile results (total time) Proc Name Self CPU Total CPU Real Time Calls ----------------------------------------------------------------------------- --------- --------- --------- --------- Before Revision /proc/powernet_nextlink 0.068 14.892 14.895 2936 /proc/powernet_nextlink 0.000 0.005 0.005 2936 Before Revision /proc/powernet_nextlink 0.077 18.886 18.887 3162 /proc/powernet_nextlink 0.000 0.006 0.006 3162 After Revision /proc/powernet_nextlink 0.046 15.185 15.186 3022 /proc/powernet_nextlink 0.000 0.005 0.005 3022 This decreases the overhead on larger powernet_nextlink() calls and also decreases the cpu usage for the client by ~30% For larger powernet_nextlink() calls the cpu usage serverside is decreased by a factor of ~30% also. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1691 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -195,23 +195,13 @@
|
||||
var/obj/cable/C = O
|
||||
|
||||
C.netnum = num
|
||||
|
||||
else if( istype(O, /obj/machinery/power) )
|
||||
|
||||
var/obj/machinery/power/M = O
|
||||
|
||||
M.netnum = num
|
||||
|
||||
|
||||
if( istype(O, /obj/cable) )
|
||||
var/obj/cable/C = O
|
||||
|
||||
P = C.get_connections()
|
||||
|
||||
else if( istype(O, /obj/machinery/power) )
|
||||
|
||||
var/obj/machinery/power/M = O
|
||||
|
||||
M.netnum = num
|
||||
P = M.get_connections()
|
||||
|
||||
if(P.len == 0)
|
||||
|
||||
Reference in New Issue
Block a user