In the permanent quest for optimization I was wondering the following: where is the tracker using the most ressources ? to detect what has changed or to send it back to the users ?
Right now I have a Session collection. When 100 players connect they all connect to the same Session so I have 100 persons link to Session(_id: 1). Each time someone makes an update all the 100 receive the update from the observeChange. So if the 100 users trigger an update, it’s 100 observe changes on the same session sent back to 100 persons.
Would it better to spread these 100 users in 10 sessions. Per group of 10 they track Session 1 to 10.
If each of them make an update it’s also 100 observe change but spread over 10 sessions that are each sent back to 10 person. At the end, same number of observe change, same number of changes sent back to user, but divided into smaller session. Is there any point of this in term of performance ? Main difference is that each user will receive only 10 updates instead of 100 as client but on server side is it improving the cpu load or rather having to track more session with less update is more consuming ?