1
0
Fork 0

Fix #8024: make online content gui more responsive while loading

Previously the internal content list was invalidated and sorted for
every new item added. Now the sorting is delayed until the GUI is
drawn, which means we only sort once per GUI tick.

Since the amount of incoming items per GUI tick is not controlled by
the GUI but rather by network speed, we were previously doing a lot
of duplicate work per tick, causing the mouse cursor to lag while
the list was initialized.
pull/8287/head
Yexo 2020-06-01 10:19:47 +02:00 committed by Charles Pigott
parent 89c8215b79
commit f4ed770cff
1 changed files with 1 additions and 1 deletions

View File

@ -951,7 +951,7 @@ public:
{
if (this->auto_select && !rci->IsSelected()) _network_content_client.ToggleSelectedState(rci);
this->content.ForceRebuild();
this->InvalidateData();
this->InvalidateData(0, false);
}
void OnDownloadComplete(ContentID cid) override