albertz / openlierox

OpenLieroX - Liero clone / Worms realtime / 2D shooter
http://openlierox.net
Other
265 stars 60 forks source link

Server lags when a new client joins during a game #121

Open albertz opened 13 years ago

albertz commented 13 years ago

Converted from SourceForge issue 2442799, submitted by dark_charlie

When join-in-game feature is enabled and a client joins during the game, the server freezes for a while (about 0.5 - 1 sec) which is pretty annoying for both the host and the playing clients.

albertz commented 13 years ago

Submitted by albertzeyer

This becomes more important as a lot of people are using this, esp. on dedicated servers this is an often used feature.

albertz commented 13 years ago

Submitted by albertzeyer

I am not sure if the lag is because of bad code or just because of much data which is sent from server to all clients when a new client joins.

It seems that the lag is very minimal (still notable though) on my computer here in the university network.

There are some things which could be a bit improved in Server::ParseConnected to send a bit less data, though not that much can be done in this respect.

I don't know if this should be a blocker for Beta9. I don't think so, I don't want to wait much longer for the release.

albertz commented 13 years ago

Submitted by albertzeyer

This should be a duplicate of this bug: https://sourceforge.net/tracker/?func=detail&aid=2785647&group_id=180059&atid=891648 (Reliable datastream should be limited)

albertz commented 13 years ago

Submitted by albertzeyer

I am not sure if it is a duplicate. I noticed this also on the client now. If I am playing on my server (which almost unlimited bandwidth - MaxUploadLimit is set to 1.1MB and my server can really have such upload, in fact it could reach 10MB upload) and often (not always) I am getting some lags when somebody joins. Actually I am not sure if it is a lag or if OLX hangs.