Compile and cache configFile eventhandlers at preStart#1052
Compile and cache configFile eventhandlers at preStart#1052commy2 merged 12 commits intoCBATeam:masterfrom
Conversation
|
Before: INCON is After: 620ms for incon. Whole XEH_preInit only takes 7.5+2.6ms (profiler messed up) now instead of 2000ms. |
commy2
left a comment
There was a problem hiding this comment.
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.
|
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
| 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.
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.
