This is called every time a bespoke element is added.
Estimated Cost
As of December 2, 2022, /datum/controller/subsystem/processing/dcs/proc/GetIdFromArguments is 793ms.
Solutions
GetIdFromArguments exists to ensure that elements with the same parameters always resolve to the same instance. Prior efforts to try to guarantee this statically have not been successful with edge cases.
It is also possible to cache this ID where it is known not to change.
It is not obvious (to me, anyway) how this could be done without introducing a footgun, breaking our 99th percentile goal.
This is called every time a bespoke element is added.
Estimated Cost
As of December 2, 2022,
/datum/controller/subsystem/processing/dcs/proc/GetIdFromArguments
is 793ms.Solutions
GetIdFromArguments
exists to ensure that elements with the same parameters always resolve to the same instance. Prior efforts to try to guarantee this statically have not been successful with edge cases.It is also possible to cache this ID where it is known not to change.
It is not obvious (to me, anyway) how this could be done without introducing a footgun, breaking our 99th percentile goal.