HomeWildfire Games

Fix Lobby/MP Gamesetup chat lag with many messages.

Description

Fix Lobby/MP Gamesetup chat lag with many messages.

CText requires re-rendering every message when adding a new one, which quickly becomes very slow.
Use CList and a custom method to work around this.

These classes are in need of a more complete refactoring.

Based on a patch by: nani

Differential Revision: https://code.wildfiregames.com/D1781

Event Timeline

vladislavbelov raised a concern with this commit.Dec 1 2020, 1:37 PM
vladislavbelov added a subscriber: vladislavbelov.

The commit doesn't change the core behavior, it still recalculates a size for each message.

/ps/trunk/source/gui/ObjectTypes/CList.cpp
64

That's not initialized in the list above.

117

We have to avoid magic numbers.

128

m_ItemsYPositions.back().

/ps/trunk/source/gui/ObjectTypes/CList.h
64

Incorrect function naming.

72

Useless because not used.

/ps/trunk/source/gui/Scripting/JSInterface_CList.cpp
35

Braces on new lines.

47

Incorrect function naming.

This commit now has outstanding concerns.Dec 1 2020, 1:37 PM

The commit doesn't change the core behavior, it still recalculates a size for each message.

?

wraitii added inline comments.Dec 1 2020, 2:10 PM
/ps/trunk/source/gui/ObjectTypes/CList.cpp
410

Right, this should read "true"...

wraitii marked 5 inline comments as done.Dec 1 2020, 2:38 PM
wraitii added inline comments.
/ps/trunk/source/gui/ObjectTypes/CList.cpp
117

This is carried over from CText.cpp... I'm not fixing it atm, should be done in D761

/ps/trunk/source/gui/ObjectTypes/CList.h
64

'Tis correct with respect to ComponentManager's and some other Script_ functions... I reckon this is more of a weird separate convention.

wraitii requested verification of this commit.Dec 2 2020, 10:30 AM
This commit now requires verification by auditors.Dec 2 2020, 10:30 AM
vladislavbelov resigned from this commit.Dec 2 2020, 6:59 PM
This commit no longer requires audit.Dec 2 2020, 6:59 PM