FS#5554 - The game slows down after playing in a network game for a while until rejoin

Attached to Project: OpenTTD
Opened by Pereyaslov Konstantin (perk11) - Monday, 20 May 2013, 15:30 GMT
Last edited by frosch (frosch) - Saturday, 11 March 2017, 22:33 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System Windows
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I've been playing the latest game on openttdcoop server with r25267 on Windows 8 x64. Right after I join the game I can zoom out to the minimum level and have the game run almost smoothly. CPU usage on my 3Hz 3-core machine is around 13-20% (33% being the maximum one core usage). But after I keep playing for 20 minutes the game starts to freeze for 3-4 game days after about every 3rd time I try to move the camera or add/remove track/change signal. Game CPU usage goes up to 33%. Zooming out fully almost certainly leads to disconnect from server due to computer being too slow. After playing for about an hour even without zooming out a longer freeze appears which leads to a disconnect.
My sprite_cache_size_px is set to default 128. This issue happens with OpenGFX, original_windows and zBase base graphic sets.
This repeats for me after every rejoin. At least one more person on the server with Win x64 has the same freezes which disappear after rejoin and everyone on a server disconnects by a timeout once in a while.
This task depends upon

Closed by  frosch (frosch)
Saturday, 11 March 2017, 22:33 GMT
Reason for closing:  Not a bug
Additional comments about closing:  too slow client
Comment by Pereyaslov Konstantin (perk11) - Monday, 20 May 2013, 15:35 GMT
The freezes also happen without moving camera, even when just watching the game, doing nothing. This is similar to the freezes which happen during autosave, except my autosave is set to yearly and this happens 2 times a minute. Game memory usage doesn't increase with time, it stays stable around 170 Mb. After 20 minutes of playing CPU usage is not constantly 33%, only during the freezes.
By freezes I understand the game stopping responding to anything, even to typing a message in chat.
Cargo flow display is not enabled.
Comment by frosch (frosch) - Saturday, 11 March 2017, 22:33 GMT
When the client cannot keep up with the server, it skips drawing frames. This appears as "freezing".
If it still cannot keep up, it disconnects.