Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing loop (fnc_startFallbackLoop) with event mission #1696

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Jonastex
Copy link

@Jonastex Jonastex commented Oct 3, 2024

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
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
Copy link
Author

Jonastex commented Oct 4, 2024

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?

addons/xeh/fnc_postInit.sqf Outdated Show resolved Hide resolved
@veteran29
Copy link
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>
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