The International Simutrans Forum

 

Author Topic: r2823 Win pak128 - random FPS drops  (Read 3764 times)

0 Members and 1 Guest are viewing this topic.

Offline Diegote

  • *
  • Posts: 140
r2823 Win pak128 - random FPS drops
« on: October 24, 2009, 09:11:31 PM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9409
  • Languages: De,EN,JP
Re: r2823 Win pak128 - random FPS drops
« Reply #1 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.

Offline Diegote

  • *
  • Posts: 140
Re: r2823 Win pak128 - random FPS drops
« Reply #2 on: October 25, 2009, 10:47:09 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)
« Last Edit: October 25, 2009, 10:52:53 PM by Diegote »

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: r2823 Win pak128 - random FPS drops
« Reply #3 on: October 26, 2009, 06:31:10 AM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9409
  • Languages: De,EN,JP
Re: r2823 Win pak128 - random FPS drops
« Reply #4 on: October 26, 2009, 07:31:17 PM »
The fps increase is slow, to avoid changing too fast. Before also decrease was slow, so changes were less noticable.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: r2823 Win pak128 - random FPS drops
« Reply #5 on: October 31, 2009, 04:00:13 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.
« Last Edit: November 01, 2009, 02:46:08 PM by z9999+ »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4555
  • Languages: EN, DE, AT
Re: r2823 Win pak128 - random FPS drops
« Reply #6 on: November 01, 2009, 05:39:00 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.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: r2823 Win pak128 - random FPS drops
« Reply #7 on: November 01, 2009, 05:51:33 PM »
Removed these code and working well.

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

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: r2823 Win pak128 - random FPS drops
« Reply #8 on: November 02, 2009, 07:42:20 AM »
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.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: r2823 Win pak128 - random FPS drops
« Reply #9 on: November 03, 2009, 07:55:40 AM »
r2839
No difference from r2836.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9409
  • Languages: De,EN,JP
Re: r2823 Win pak128 - random FPS drops
« Reply #10 on: November 03, 2009, 10:41:03 AM »
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.