Page MenuHomeFeedback Tracker

globalChat and systemChat on a headless client is horribly slow
Feedback, NormalPublic

Description

I randomly stumbled upon this while testing a few things with a headless client, I assume this is most likely because these two methods are pushing the message onto the process's log window which for some reason is horribly expensive.

Details

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

Spin up a dedicated server and a headless client
Load up any random mission with HC support and debug console access
Execute the following globally on all machines:

if (!isDedicated && {!hasInterface}) then {
  private _retValGlobal = diag_codePerformance [{player globalChat "some random message";}, 0, 10000];
  missionNamespace setVariable ["retValGlobal", _retValGlobal, true];
  private _retValSystem = diag_codePerformance [{systemChat "some random message";}, 0, 10000];
  missionNamespace setVariable ["retValSystem", _retValSystem, true];
};

Check value of retValGlobal by adding it to one of the watch boxes and in my case the value returned:
[3.31023,303]
Check value of retValSystem by adding it to one of the watch boxes and in my case the value returned:
[2.4431,413]

Event Timeline

and for context I'm referring to the messages getting added to this dialog: https://i.gyazo.com/89438912d03e0b7cab3a8081181a5f98.png

dedmen claimed this task.Jan 4 2021, 2:51 PM
dedmen changed the task status from New to Assigned.
dedmen set Ref Ticket to AIII-53678.
dedmen changed the task status from Assigned to Feedback.Jul 7 2022, 2:20 PM

profiling branch v20
You won't be able to test it with codePerformance tho, the buffer is only 32 messages