Skip to content

Replacing loop (fnc_startFallbackLoop) with event mission#1696

Open
Jonastex wants to merge 4 commits into
CBATeam:masterfrom
Jonastex:fnc_startfallbackloop
Open

Replacing loop (fnc_startFallbackLoop) with event mission#1696
Jonastex wants to merge 4 commits into
CBATeam:masterfrom
Jonastex:fnc_startfallbackloop

Conversation

@Jonastex

@Jonastex Jonastex commented Oct 3, 2024

Copy link
Copy Markdown

When merged this pull request will:

  • This modification removes the loop that checks if all the new entities are properly initialized and replaces it with the mission event "EntityCreated" which allows for checking if the new entity is properly initialized and if not to do so. This modification allows for a performance gain

@veteran29

Copy link
Copy Markdown
Member

This modification allows for a performance gain

Any benchmarks? EntityCreated runs for a lot more objects than entity command returns (bullets, impact decals, butterflies etc.) so would need filtering.

@Jonastex

Jonastex commented Oct 4, 2024

Copy link
Copy Markdown
Author

Any benchmarks?

Yes, I used the Arma Script profiler. Here are the results I got with a friend's modpack. These results are specific to each modpack because, for CBA_fnc_StartFallBackLoop to run, incompatible XEH mods must be used. The statistics shown in the screenshot represent 5 minutes of gameplay on a server
benchmark_cba

EntityCreated runs for a lot more objects than entity command returns (bullets, impact decals, butterflies etc.) so would need filtering

If it's not necessary to initialize CBA on these entities, maybe filter the event handler with BIS_fnc_objectType?

Comment thread addons/xeh/fnc_postInit.sqf Outdated
Comment thread addons/xeh/fnc_postInit.sqf Outdated
@veteran29

Copy link
Copy Markdown
Member

Your script profile includes only the fallback loop but nothing to compare to (EH).

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
@Jonastex

Jonastex commented Nov 2, 2024

Copy link
Copy Markdown
Author

Hello, here is the performance feedback I have with the EH modification
bench

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants