Page MenuHomeFeedback Tracker

Creating ModuleCurator_F in-game is slow
New, NormalPublic

Description

Creating a ModuleCurator_F mid-session takes ~10x longer than normal units.
ModuleCurator_F: 0.048996s
B_Soldier_A_F: 0.00300598s

When mods are loaded and manually activated at the start of the mission with activateAddons, the time for ModuleCurator_F increases massively, to the point where the game freezes for roughly a quarter of a second. When using an on-the-fly curator login system, this becomes quite ugly, as each person who logs in creates a quarter second freeze for the entire server.
Large modset without activating addons:
ModuleCurator_F: 0.0769997s
B_Soldier_A_F: 0.000999451s

Large modset and manually activating all addons:
ModuleCurator_F: 0.245998s
B_Soldier_A_F: 0.000999451s

This effect is seen in all modes of play.

Manually activating the addons at mission start for the login system is done so singleplayer has access to all addons, instead of just the official addons, as using activateAddons mid-game is not possible.
My thought is something behind the scenes with the curator simulation type with a lot of addons activated is causing this delay. Whether this can be prevented or lessened is what I'm trying to find out. To clarify, creating a curator without forcing any addons to load is relatively slow as well compared to a normal unit.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

1 - Load the editor on any map. Place a single unit anywhere and press play (singleplayer or multiplayer, but for multiplayer the debug console has to be allowed for everyone/host).
2 - Go to the debug console and run:

_fnc_dump = {
    player globalchat str _this;
    diag_log str _this;
};
_t1 = diag_tickTime;
(createGroup sideLogic) createUnit ["ModuleCurator_F", [0,0,0], [], 0, "NONE"];
(diag_tickTime - _t1) call _fnc_dump;

then

_fnc_dump = {
    player globalchat str _this;
    diag_log str _this;
};
_t1 = diag_tickTime;
(createGroup west) createUnit ["B_Soldier_A_F", [0,0,0], [], 0, "NONE"];
(diag_tickTime - _t1) call _fnc_dump;

3 - Repeat the above steps with mods loaded to observe the increased time taken to create ModuleCurator_F. A larger modset provides a better example of the time increase. The mods used to test this are listed below.
4 - Loading without @uksf_curatortest and performing steps 1 & 2 shows the same increased delay as before, however loading with @uksf_curatortest shows a largely increased delay. 0.0769997s vs 0.245998s

Additional Information
@CBA_A3;
@CUP_Terrains_Core;
@CUP_Terrains_Maps;
@CUP_Units;
@CUP_Vehicles;
@CUP_Weapons;
@uksf_curatortest;

@uksf_curatortest can be downloaded here: https://github.com/uksf/CuratorTest/releases/tag/1.0.0

Event Timeline

AtomicTim7 updated the task description. (Show Details)Apr 27 2017, 4:00 PM