Files
Bubberstation/code/datums/ai/basic_mobs/basic_ai_behaviors
SkyratBot d538bf0de0 [MIRROR] Optimize find_potential_targets self cost [MDB IGNORE] (#25883)
* Optimize find_potential_targets self cost (#80602)

![image](https://github.com/tgstation/tgstation/assets/35135081/84ae20b6-5f44-4a69-bda3-0df1435dea5c)

`find_potential_targets/perform` currently has a pretty bad self cost in
part due to it running a second "loop over everything in range" check to
find turrets and mechs. This doesn't drop it down by as much as I'd like
because it still needs `hearers`, it still shows up pretty high, but
this at least cuts out some unnecessary work.

Best case is likely to minimize work AIs need to do when there are no
players on their z-level, as there are a lot of calls from Lavaland.

* Optimize find_potential_targets self cost

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-12-28 07:55:30 -08:00
..