-
Notifications
You must be signed in to change notification settings - Fork 149
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
Overhaul activateAddons #1051
Overhaul activateAddons #1051
Conversation
"sparse"? |
https://en.wikipedia.org/wiki/Sparse_file. Got a better name? Before:
By filtering out addons with empty |
Test with only CBA, CBA + ACE, and then with whatever you're using and compare them all. |
ace uses https://github.com/acemod/ACE3/blob/master/addons/common/scripts/checkVersionNumber.sqf#L10 We should probably just start using |
|
So do most people... you are no special furry! 😆 |
We badly need multiline suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like everything, except the variable names. With my suggestions the script becomes more "poetic" I think.
Also needs toLower
I'd say.
Co-Authored-By: dedmen <dedmen@users.noreply.github.com>
Co-Authored-By: dedmen <dedmen@users.noreply.github.com>
Co-Authored-By: dedmen <dedmen@users.noreply.github.com>
Cache the addons list at game start instead of always iterating through config at preInit.
Create a "sparse" list with only the addons that really need to be passed to
activateAddons
because activateAddons is VERY slow.CBA common preInit is the 3rd slowest in my modset, and this code is the main cause.
Left of the red line you can see the iteration through config right after the preprocess and compile for the init functions. Red line is the call to activateAddons.