You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In sessionWS, the sending of messages is synchronized using sync.Mutex. This has a significant performance impact when there is a need for broadcasting in the game.
SendBytes and processOutgoing currently use channels for communication, and in fact, locks are not necessary. The only places where locks may be needed are in the WriteMessage function in processOutgoing and SendBytes.
It is recommended to remove unnecessary locks in these functions. This would lead to significant performance improvements in projects such as MMOs that require a large amount of broadcasting.
The text was updated successfully, but these errors were encountered:
In sessionWS, the sending of messages is synchronized using sync.Mutex. This has a significant performance impact when there is a need for broadcasting in the game.
SendBytes and processOutgoing currently use channels for communication, and in fact, locks are not necessary. The only places where locks may be needed are in the WriteMessage function in processOutgoing and SendBytes.
It is recommended to remove unnecessary locks in these functions. This would lead to significant performance improvements in projects such as MMOs that require a large amount of broadcasting.
The text was updated successfully, but these errors were encountered: