Author Topic: Lag After Pause  (Read 913 times)

0 Members and 1 Guest are viewing this topic.

Offline LegendkxTx

Lag After Pause
« on: March 08, 2017, 03:49:02 PM »
My Simutrans was lagging severely after pausing / loading a map and it takes minutes to recover to normal speed. This is really annoying as I used to pause and edit.

How can I solve the problem?

My Simutrans is of version 112.3 running on Windows 10.

Thank You!

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4862
  • Total likes: 201
  • Helpful: 108
  • Languages: EN, NO
Re: Lag After Pause
« Reply #1 on: March 08, 2017, 06:34:40 PM »
You should try a newer version, because I haven't noticed that behavior in a long time. 112.3 is almost 4 years old.

Offline DrSuperGood

Re: Lag After Pause
« Reply #2 on: March 08, 2017, 07:20:02 PM »
I get a similar issue when I stop the game using a debugger (not actual pause). The game must be trying to catch up for lost time, the result of a sudden time spike between frames caused by being paused by the debugger. During the catch up time I have very low frame rate and it lasts for up to several minutes (probably based on time spent stopped) until it returns to normal.

When playing single player this should not happen as no one cares if time was lost between frames and things are only made worse if it tries to catch up that time.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4862
  • Total likes: 201
  • Helpful: 108
  • Languages: EN, NO
Re: Lag After Pause
« Reply #3 on: March 08, 2017, 08:37:56 PM »
I get a similar issue when I stop the game using a debugger (not actual pause). The game must be trying to catch up for lost time, the result of a sudden time spike between frames caused by being paused by the debugger. During the catch up time I have very low frame rate and it lasts for up to several minutes (probably based on time spent stopped) until it returns to normal.

When playing single player this should not happen as no one cares if time was lost between frames and things are only made worse if it tries to catch up that time.

You did not need the debugger for such behavior earlier, but I believe that changed years ago. At least I have not noticed it recently, but then again, I rarely pause, probably due to past experiences with this.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8821
  • Total likes: 322
  • Helpful: 229
  • Languages: De,EN,JP
Re: Lag After Pause
« Reply #4 on: March 09, 2017, 12:34:17 AM »
Pause should only cause a lag, oif the game engine is challenged to much. Because after pause, it tries to start with the normal frame rate. If it cannot keep up with that, it will gradually reduce the frame rate until it can handle all the other interaction again.

Older version had the issue, htat they started the timer before loading was complete, and hence confused the frame rate calculation. (And they lacked proper multithreaded redraws, althoung I am not sure about 112.3). But you should update, the have been many errors fixed since then.

Offline LegendkxTx

Re: Lag After Pause
« Reply #5 on: March 09, 2017, 09:07:12 AM »
I have played 112.3 for years since it is the last version not supporting half-slope and keeping every old pak running in good conditions.
Yet the problem arises only in the latest period. I wonder if it is related to the number of paks (& addons) I installed or the number of transports in the save.

If I have to update my Simutrans, will I be able to retain the old landscape system (no half-slope) without any displaying problems (like the island in the following pic)?

Offline Leartin

  • Devotee
  • *
  • Posts: 843
  • Total likes: 301
  • Helpful: 44
  • !!!!!This user was banned for double posting!!!!!
  • Languages: DE, EN
Re: Lag After Pause
« Reply #6 on: March 09, 2017, 09:47:42 AM »
If I have to update my Simutrans, will I be able to retain the old landscape system (no half-slope) without any displaying problems (like the island in the following pic)?

Almost. You can go without half-slopes by using an old pakset, and you can disable lake generation (water with flat shore), but you would still be able to create flat shores manually. And if you do create a situation that was impossible before (like a 1 tile flat island) there would be a graphic bug since the old pakset does not know how to handle that. It would probably require to use the newer "Slopetrans" and "Shoretrans" files of the newer pak edition. But this is minor, I'd suggest you just try it with a copied savefile and the pakset you already use.

Offline Junna

Re: Lag After Pause
« Reply #7 on: March 09, 2017, 05:37:52 PM »
Actually I've had this weird lag problem, but rebooting usually fixes it. It only happens on the current computer (from 2012), I assume it's something CPU related.