News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

r2823 Win pak128 - random FPS drops

Started by Diegote, October 24, 2009, 09:11:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Diegote

The fps drop to 0-6 for about 20 seconds, then rise again near ~25FPS . After a few minutes (2-3) this happens again.

I tested GDI version and SDL version, new games and loading savegames, and tested it in two computers.

prissi

The you have something, that forbids interaction for more than 300ms. In such case simutrans will reduce the fps quickly to 5 fps to finish whatever goes on in the background of the engine more quickly. I suppose it might be the autosave though ... This shoudl be very apparent, if you run in fast forward mode, as then only very few vehicle movements will happen suddenly.

Diegote

#2
Quote from: prissi on October 25, 2009, 07:23:42 PM
The you have something, that forbids interaction for more than 300ms. In such case simutrans will reduce the fps quickly to 5 fps to finish whatever goes on in the background of the engine more quickly. I suppose it might be the autosave though ... This shoudl be very apparent, if you run in fast forward mode, as then only very few vehicle movements will happen suddenly.

I downloaded the game, unzipped the files, copied the pak128 1.4.5, and started to play. With default setting, the autoSave function is disabled. I have also noticed that cpu usage drops down to 3-6% (from normal usage 20-30%)

This also happen in r2818

I watched for a while and I noticed that this drops seems to happen when a midi track ends and starting a new midi track (I'm not 100% sure that only happens when start a new midi track)

z9999+

Some strange thing I found is...
Idle time sometimes shows big number, maybe 0 minus 1 ?
Although simloops shows higher number like as 8.0 or 9.0, fps doesn't increase soon.
It increased after over 10.0 simloops.

prissi

The fps increase is slow, to avoid changing too fast. Before also decrease was slow, so changes were less noticable.

z9999+

#5
Quote from: prissi on October 25, 2009, 07:23:42 PM
The you have something, that forbids interaction for more than 300ms. In such case simutrans will reduce the fps quickly to 5 fps to finish whatever goes on in the background of the engine more quickly.

I still hear complaining about this.
This is very annoying for the players who don't have any performance problem.
For example, it will happen just after opening minimap.

Released version of 102.2 was much more better performance than current version.


[EDIT]
Problem often happed when zoom-in, zoom-up, rotate, changing to underground view, changing slice view height, etc.
And once it happend it takes more than 30 seconds to back to normal fps.

Dwachs

Quote from: z9999+ on October 31, 2009, 04:00:13 PM
[EDIT]
Problem often happed when zoom-in, zoom-up, rotate, changing to underground view, changing slice view height, etc.
All this operations are quite expensive in terms of performance, since for all objects on the map a new image is calculated. Of course this can be optimized etc.
Parsley, sage, rosemary, and maggikraut.

z9999+

Removed these code and working well.

Quote
         if(  last_ms-last_interaction > 300  ) {
            set_frame_time( 250 );
         }

z9999+

r2836

default fps=25:
During normal playing, it is a little better than before.
But after saving a game, it will go down to 2 fps, this is worse than before.

default fps=10:
No difference. Most of times only 4-5 fps.



This is only my result.
Many people stopped to play latest nightly because of fps problem, so I have not gotten any other player's feedback yet.

z9999+


prissi

Aparently I need more heavy save games, since all the games I have work smoothly (within the limits) and I never observe a drop of the fps below 4. If you or anybody could provide a savegame I would be greatful.