[0.10.9] Low FPS due to slow flip
[0.10.9] Low FPS due to slow flip
This is a compression of two threads from technicall support:
https://forums.factorio.com/forum/vie ... =49&t=5647
https://forums.factorio.com/forum/vie ... =49&t=5631
https://forums.factorio.com/forum/vie ... =49&t=5647
https://forums.factorio.com/forum/vie ... =49&t=5631
Re: [0.10.9] Low FPS due to slow flip
This one also ties into that issue: https://forums.factorio.com/forum/vie ... =48&t=4883
There (may or may not) be helpful information on the last post I made on that.
There (may or may not) be helpful information on the last post I made on that.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.10.9] Low FPS due to slow flip
I'm re-posting this here for visibility:
I did some more research into this issue and I don't believe it's related to the Factorio graphics library: Allegro.
I believe it's simply a fault of VSYNC and the mechanic behind it. VSYNC limits the refresh rate of the game to that of the monitor. If for any reason it can't keep it at a steady 60 FPS it will half it and try to keep it at 30. If it can't do 30 it goes half that and repeats. That's why different reports from people have shown up where the "Flip" timer is taking 30~ MS instead of the normal 15~ MS.
In order to fix that, the refresh rate would need to be controlled manually: timing how long since the last refresh and sleeping 15MS - time since last each frame (or something close to this effect).
Now, this is all speculation up to this point. I haven't done any actual tests (yet). If I find out anything else that might be useful i'll post it here.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.10.9] Low FPS due to slow flip
I need to know if the problem appeared exactly during the transition 0.10.9 -> 0.10.10.
Who could prove/disprove that?
Who could prove/disprove that?
Re: [0.10.9] Low FPS due to slow flip
I've had the issue since 0.9 - it's not specific to any version. Also, did you mean 0.10.8 -> 0.10.9? 0.10.10 isn't out for public use yet.kovarex wrote:I need to know if the problem appeared exactly during the transition 0.10.9 -> 0.10.10.
Who could prove/disprove that?
My current VSYNC theory does make sense though: Flip() waits for the next monitor refresh. If the total time since the last Flip() is greater than 15 MS it would have missed the refresh and it's going to wait for the next Flip() which would put the total time between frames at 30 MS for a total of 30 FPS.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.10.9] Low FPS due to slow flip
Low FPS due to high flip happens to me every time there are a lot of trees in the screen, like when walking through a forest while zoomed out. Zooming in or walking away from the forest lowers the flip value again.
This happens since 0.10.3, which was the first version I played.
This happens since 0.10.3, which was the first version I played.
Re: [0.10.9] Low FPS due to slow flip
I've had this problem since the first version I played namely 0.9.8. I have no data from before this version as I did not play them. Thanks for looking into it =)kovarex wrote:I need to know if the problem appeared exactly during the transition 0.10.9 -> 0.10.10.
Who could prove/disprove that?
Re: [0.10.9] Low FPS due to slow flip
I added experimental option to disable v sync (for 0.10.10), it is not good to play with that (v sync has its reason), but it could help to find out, if the time spent on the flip is caused by vsync or something other.
Re: [0.10.9] Low FPS due to slow flip
kovarex wrote:I added experimental option to disable v sync (for 0.10.10), it is not good to play with that (v sync has its reason), but it could help to find out, if the time spent on the flip is caused by vsync or something other.
If released by the time I leave for work then I will help test this. (I am virtually without download possibilites due to internet situation onboard the ship I work on, and I am away for 4 weeks)
- pyrolytic_tungsten
- Fast Inserter
- Posts: 115
- Joined: Fri Aug 01, 2014 4:29 am
- Contact:
Re: [0.10.9] Low FPS due to slow flip
I played a little with 0.10.10. In previous versions I sometimes had reduced framerate when fully zoomed out in forests with increased flip time. Now flip always stays low and the framerate is good in forests regardless of vsync setting (with game restarts when the setting is changed). I can't notice any difference with either vsync setting but I am using a CRT monitor with 75 Hz refresh so tearing may be more noticeable to those with LCD displays and the like. This issue is fixed for me.
Re: [0.10.9] Low FPS due to slow flip
It seems much better on my end aswell, I don't have the time to test properly, but I haven't had any really noticeable slowdowns with the latest version. Will play more with it when I get the spare time to do so
Re: [0.10.9] Low FPS due to slow flip
Well, this seems like magic, but ok.
By the way, this "might" be affected by the selection of default video adapter, anyway I'm moving this to resolved then.
By the way, this "might" be affected by the selection of default video adapter, anyway I'm moving this to resolved then.
Re: [0.10.9] Low FPS due to slow flip
Work better on my End aswell.
Now the Game runs faster, but with tearing of course without VSync.
Now the Game runs faster, but with tearing of course without VSync.
Re: [0.10.9] Low FPS due to slow flip
Well, this means it still isn't solved, could you post screenshots of the time spent in flip when the option is on and off?
- pyrolytic_tungsten
- Fast Inserter
- Posts: 115
- Joined: Fri Aug 01, 2014 4:29 am
- Contact:
Re: [0.10.9] Low FPS due to slow flip
It turns out that during my previous tests the forest didn't want to give me low fps with vsync enabled. I had been mostly running with vsync off since my initial tests so I didn't see it. I saw that happen today. Disabling vsync causes the low fps to go away. I don't know why it didn't give me low fps in my earlier testing. It is erratic since I can find an area that gives low fps, save, disable vsync, restart Factorio, see it works fine, enable vsync, close Factorio, see the config has "v-sync=true", start Factorio, and it still works fine. I haven't seen any tearing with vsync disabled. Perhaps it's something weird about my linux/Xorg/proprietary Nvidia drivers/geforce 240/configurations/CRT monitor. I'll try and grab some screenshots next time.