Re: [0.17.4] [MacOS] Delays in control
Posted: Mon Mar 04, 2019 5:48 pm
<3posila wrote: Mon Mar 04, 2019 12:43 pm Thanks for the reports and your logs.
It is fixed for 0.17.5
<3posila wrote: Mon Mar 04, 2019 12:43 pm Thanks for the reports and your logs.
It is fixed for 0.17.5
Amazing news! Thanks for getting this fixed so quickly, it has really been testing my dedication to struggle through the lag and play the game the last few daysposila wrote: Mon Mar 04, 2019 12:43 pm Thanks for the reports and your logs.
It is fixed for 0.17.5
EDIT: I was stuck in a mindset that the problem was caused mainly by rendering in Retina resolution so I started to prepare downscaled rendering on Friday, but after seeing all your logs and seeing that lot of you don't even run the game at FullHD, let alone on Retina; and lot of you mentioned trackpad so I switch my focus on our event processing code and found bug in it.
Rendering in Retina resolution is still problem on some configurations but it'll be handled as separate issue.
Out of curiosity, what specifically caused the lag? I have experienced the same on other software, but nobody managed to fix the issue before now.posila wrote: Mon Mar 04, 2019 12:43 pm and lot of you mentioned trackpad so I switch my focus on our event processing code and found bug in it.
Obviously I haven’t seen the code, but the precise and responsive scrolling you get with a trackpad on macOS requires events to be sent at a very high frequency. From what posila said, I’m guessing the event processing loop was getting overwhelmed, and then taking a while to catch up with the event queue.
I'd be curious to hear about that too, but the patch notes give a little more info:
Fixed controls were lagging when application window was receiving lot of events it didn't recognize on macOS or Linux.
Aha! Interesting, and thank you for the quick fix!posila wrote: Tue Mar 05, 2019 10:04 pm The problem was we are translating SDL events to our own structures, and if there was an event that didn't yield any Factorio event, it would be mistaken for "end of the event queue" and event processing would stop until next frame. Touchpad was probably cause extra touch event to be sent; we don't care about thouse, so each of them always delayed processing of rest of the event queue by one frame.