Page 1 of 1

[Oxyd] Running Factorio makes XFCE window-dragging laggy

Posted: Fri May 19, 2017 1:34 pm
by Baughn
Frankly, I won't blame you if you ignore this one...

When running Factorio under XFCE, after it's started, dragging windows around the screen gets really laggy; that is, it only updates four to eight times per second. Not smooth at all. That's true for the Factorio window, of course, but it also affects Chrome. I haven't checked if it's universal, but I can do that if you actually want to debug it. Resizing windows doesn't have the same effect, and screen-drawing in general is fine; nothing else lags.

The problem probably didn't start with 0.15, but does seem to have gotten worse. Maybe due to high-resolution textures, as a guess?

This is with an nVidia 1070, so it shouldn't be a lack of resources...

Re: [0.15.x] Running Factorio makes XFCE window-dragging laggy

Posted: Fri May 19, 2017 1:57 pm
by Oxyd
Do you have the compositor enabled? Are you using the proprietary NVidia driver or nouveau?

If everything else is fine, though, I'd highly suspect xfwm to be at fault here.

Re: [0.15.x] Running Factorio makes XFCE window-dragging laggy

Posted: Sun May 21, 2017 12:47 pm
by Baughn
Compositor enabled, proprietary nvidia driver. Disabling it fixes the problem, except that then I get screen tearing instead, so it's not ideal.

Re: [0.15.x] Running Factorio makes XFCE window-dragging laggy

Posted: Thu Jun 15, 2017 2:02 pm
by Baughn
Disabling the compositor doesn't fix the second problem, though: Namely, resizing the window makes Factorio lag out and sometimes (appear to) freeze.

That is, specifically dragging the side of the window to resize it. Using any of xfce's snapping features, or maximize/windowed fullscreen, it resizes near-instantly. If I drag it, then Factorio appears to freeze for a period of time proportional to the time I spent dragging.

I suspect what's going on here is you're doing some expensive calculation (GL setup? Texture atlast recalculation?) on resize, but allow for an infinite queue of resize requests. The simplest fix would be to throttle resizes, ignoring any concurrent resize events. (Just make sure the final resize event does eventually get executed.)

Re: [0.15.x] Running Factorio makes XFCE window-dragging laggy

Posted: Wed Jun 21, 2017 2:30 pm
by Rseding91
I don't consider this worth any time to work on. I'm going to move it to won't fix.

Re: [0.15.x] Running Factorio makes XFCE window-dragging laggy

Posted: Thu Jun 22, 2017 11:53 am
by Oxyd
Rseding91 wrote:I don't consider this worth any time to work on. I'm going to move it to won't fix.
It's not like you will be fixing it anyway. :P

I can definitely confirm that resizing the Factorio window is super slow. I'll look into it.

Re: [Oxyd] Running Factorio makes XFCE window-dragging laggy

Posted: Fri Jul 14, 2017 4:33 pm
by Oxyd
So as it turns out, we were reloading a bunch of fonts with every resize event.

Fixed in 0.15.31.