turns change slower and slower as the game progresses

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: turns change slower and slower as the game progresses

#46 Post by Vezzra »

quantumimmortal wrote:I'm on 0.4.5 (i doubt the issues i described were alredy fixed.)
Actually, a lot of fixes for the lag problem, especially the GUI, went in for 0.4.6 (quote from the "Key Changes" section of the 0.4.6 changelog: "Many small additions/changes to GUI rendering, layout, functionality, customization options, and displayed information that collectively substantially improve usability, responsiveness, and system resource usage").

So it would be very important for us to know how the new release works for you, but you'd have to build FO 0.4.6 for yourself as apparently it isn't provided by the repo for your version of Ubuntu...

hosford42
Space Krill
Posts: 1
Joined: Thu Apr 21, 2022 10:04 pm

Re: turns change slower and slower as the game progresses

#47 Post by hosford42 »

I have the same problem. Something I've noticed is that if I switch to a different window, the frame rate drops and the effect on turn length pretty much vanishes. I keep an empty editor window open, and after hitting next turn, I just switch to the editor window and the turn change ends in just a few seconds.

IDK why it makes such a huge difference, but I have an idea: I think the UI is eating up all the processor time and starving the back end. Maybe if the UI were paused during the turn change it would alleviate the problem? Or maybe the relative "niceness" of the subprocesses could be tweaked to keep the back end from starving?

Not sure if it's relevant, but I'm running Ubuntu 20.04 LTS. Maybe the way the particular OS balances the processes could come into play?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: turns change slower and slower as the game progresses

#48 Post by Geoff the Medio »

It probably depends on how your system schedules and prioritizes processes and how many cores your CPU has. Here's a screenshot of part of the CPU core use timecourses window on my system, where for the first half of the trace, I have the FreeOrion window on top in the window manager with input focus, and the second half, it's not the top window. There's a big drop in the total use half way through the trace as the FPS is capped much lower when the window is unfocused.
crop of CPU usage timecourse plots while running FreeOrion
crop of CPU usage timecourse plots while running FreeOrion
FO_CPU_core_use_focused_and_unfocused.png (11.07 KiB) Viewed 1141 times
Edit: Also of interest: the full plot array with a press of the turn button mid-way through the trace...
crop of CPU usage timecourse plots while running FreeOrion with a turn cycle in the middle
crop of CPU usage timecourse plots while running FreeOrion with a turn cycle in the middle
FO_CPU_core_use_focused_with_turn_cycle.png (60.6 KiB) Viewed 1141 times

Post Reply