forked from mirrors/0ad
Lobby performance improvement.
Since 8b437a0b1c, updatePlayerList() is called everytime a muc-message
is received, calling playersBox.SelectionChange(), calling
displayProfile() which requests the profile from the server again.
Similar cases should be handled in #3840.
This was SVN commit r17924.
This commit is contained in:
@@ -353,7 +353,10 @@ function updatePlayerList()
|
||||
playersBox.list_status = presenceList;
|
||||
playersBox.list_rating = ratingList;
|
||||
playersBox.list = nickList;
|
||||
playersBox.selected = playersBox.list.indexOf(g_SelectedPlayer);
|
||||
|
||||
// To reduce rating-server load, only send the GUI event if the selection actually changed
|
||||
if (playersBox.selected != playersBox.list.indexOf(g_SelectedPlayer))
|
||||
playersBox.selected = playersBox.list.indexOf(g_SelectedPlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user