KAT unit init takes a loong time
Closed this issue · 2 comments
MildlyInterested commented
Arma 3 Version: Latest profiling branch
CBA Version: Latest steam version
ACE3 Version: Lastest steam version
Mods:
- CBA_A3
- ace
- KAT
- Arma Script Profiler
- Intercept Minimal Dev
- other stuff
Description:
- the event handler that inits KAT on units takes a loong time
- As the picture below shows the KAT inits take about 8 ms to run
- ACE medical only takes 6.5 microseconds to run, that's 1200 times faster.
- Looking at ACE's EH they call FUNC on init https://github.com/acemod/ACE3/blob/b78f8684b73c55191fe83026dc8b3a8c6bf5b67d/addons/medical_status/CfgEventHandlers.hpp#L19-L26
- KAT/KAM calls COMPILE https://github.com/Tomcat-SG/KAM/blob/f6abbfa993382cb8e37b36e8399c1b6eb4e6f4e6/addons/airway/CfgEventHandlers.hpp#L8-L14
- I think that means the functions get recompiled on every unit, using up precious frames
Steps to reproduce:
- Run server with Arma Script Profilers Tracy connected
- Spawn in units with Zeus
- Check frametimes
Where did the issue occur?
- Dedicated
Additional Comments
- Add a setting to disable KAT on all AI to avoid calling the init altogether
MildlyInterested commented
MiszczuZPolski commented
Resolved with #285