-
Notifications
You must be signed in to change notification settings - Fork 148
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
Compile and cache configFile eventhandlers at preStart #1052
Conversation
Before: INCON is After: 620ms for incon. Whole XEH_preInit only takes 7.5+2.6ms (profiler messed up) now instead of 2000ms. |
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.
As Pabst wrote, this needs a rewrite of CBA_fnc_compileEventHandlers
to compile the sum of all preInit and postInit events in such a way, that they include the isServer
etc. checks in their code.
Otherwise serverInit events would run on a dedicated client, and clientInit events would run on a (dedicated?) server.
Otherwise this PR is fine.
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.
see comments
rough idea: 06ad425 |
Anyone update this PR, or should I make my own with both ideas? |
Can't you just push into this one? feel free to. I won't have time till monday |
How? |
|
pushed changes for the init events as well
preProcessing is disabled with the recompile bit or
|
That didn't work well. Now the diff shows commits between when this branch was split from master and not the current master. |
565352d
to
b55f06c
Compare
@@ -15,5 +15,5 @@ if !(_event isEqualTo "") then { | |||
private ["_event", "_className"]; // prevent these variables from being overwritten | |||
_args call compile getText _x; | |||
} forEach configProperties [_x >> XEH_FORMAT_CONFIG_NAME(_event) >> _className, "isText _x"]; | |||
} forEach XEH_MAIN_CONFIGS; |
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.
why?
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.
Macro seemed pointless. Bugged me for a while and now is an opportunity to muck it out.
|
"test1 - init" |
They won't change after preStart as the config cannot be edited. So no reason to recompile them each preInit.
This is a mission with no eventhandlers in description or campaign config. Meaning 100% of that compileEventHandlers is just configFile. 670ms wasted each preInit for something that can be done once.