On Lobby data optimization.

Options
Hello!
We are using PUN for several years.
Now we have reached a quite big number of CCU.
We are saving some data on room properties (mostly player IDs).
So when the player joins to lobby, the big amount of room properties data received (about 1mb in 2-3minutes).

Is it possible to disable auto synchronization or change receive rate time on lobby?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @devolzhas,

    Thank you for choosing Photon!
    So when the player joins to lobby, the big amount of room properties data received (about 1mb in 2-3minutes).

    I think you should review how you use lobbies and how you use lobby properties or properties visible to the lobby.
    In fact,

    1- if you don't need to join a lobby, don't, avoid it
    2- all custom room or actor properties should not be that many or that big, if you can optimize this do it
    In particular, custom room properties visible to the lobby should not be many or big.
    3- if you can use multiple lobbies, do it
    4- if you can reduce updates frequency, do it, you should maybe change the client code to reduce the room properties updates requests from the clients by grouping properties updates in fewer calls. Custom room properties visible to the lobby should not change that often
    (mostly player IDs)

    By "player IDs" I assume it's UserID, right?
    The question is why do you need to set "player IDs" in lobby properties?
    How do you use this?
    Is it possible to disable auto synchronization or change receive rate time on lobby?
    We could discuss options once we finish the other questions.
  • devolzhas
    devolzhas
    edited January 2020
    Options
    Thank you for your answer. @JohnTube

    Player ID integer unique value generated in our game.
    In order to find friends, these IDs are retrieved from all rooms on lobby.
    Room properties are updated when a new player enter/exit room, so update happens so often.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hey @devolzhas,

    This looks a bit like re inventing an already existing good wheel :smile:
    I think you should reconsider this and instead use UserId and FindFriends (optionally RoomOptions.PublishUserId).
    So start by setting the UserId to a the unique integer PlayerID generated in your game then use the UserId for everything now.
    See here.
  • devolzhas
    Options
    Thank you for the useful information. @JohnTube

    We have implemented this method.
    Also we used sql lobby with GetCustomRoomlist.
    However, GetCustomRoomlist returns only 100 rooms, where actually we have 2000 rooms.
    Do you know anything about this 'limit'?