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:
elexis 2016-03-21 03:44:01 +00:00
parent cfe169d2bc
commit 8f4daa9dd0

View file

@ -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);
}
/**