News for hackers. Stuff that matters.
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by happytoexplain on Sunday July 18, 2021 @04:36PM (#27876454)
>the render loop of the OS is decoupled from the app

Can you elaborate on this? If you do too much work on the main thread in iOS, it's going to hang the UI. Isn't the main thread the "render thread"? Do scroll views have some kind of special escape hatch to get off the main thread for continuing to scroll if the main thread is blocked with loading the content?

Re:An app for M1 Macs that plays the sound of a fan as CPU u... by ubertoop on Sunday July 18, 2021 @04:40PM (#27876489)
I believe the point is that the "main thread" for your iOS application, is not the main thread of the OS. They're totally decoupled.
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by IAmLiterallyAB on Sunday July 18, 2021 @06:07PM (#27877113)
Err, same with Android? And every OS ever. That's just standard process isolation. Or am I misunderstanding something?
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by brianwawok on Sunday July 18, 2021 @06:49PM (#27877382)
There’s some deep dive articles on the way the input loop works. But OP is correct, and the reason iOS feels smoother. Android has a lot more UI lag.
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by codedokode on Sunday July 18, 2021 @07:35PM (#27877704)
I don't think Apple has any special tricks for input loop.

Some Android phones really have input lag, but it is not caused by CPU load. For example, on my phone, there is approximately 100-150 ms lag between tapping the screen and registering the touch. The lag is not caused by CPU load, but by slow touch sensor.

I don't think Apple has any smart code optimization tricks. Either they have a faster touch sensor or just some people believe that if something is made by Apple then it is of a better quality.

Here is a comparison of input lag in games in iOS and Android [1] and it shows similar results: 80 ms between a tap and reaction on screen.

[1] https://blog.gamebench.net/touch-latency-benchmarks-iphone-x...

Re:An app for M1 Macs that plays the sound of a fan as CPU u... by ajconway on Sunday July 18, 2021 @07:45PM (#27877770)
They do! See https://devstreaming-cdn.apple.com/videos/wwdc/2015/233l9q8h... and the corresponding WWDC session on them minimizing the input-to-display time.
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by ericye16 on Sunday July 18, 2021 @11:11PM (#27878890)
This is off-topic, but I love that the title of the slides is "233_Advanced Touch Input on_iOS_04_Final_Final_VERY_Final_D_DF.key".
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by jppittma on Monday July 19, 2021 @10:07AM (#27882793)
I wonder why somebody working at apple wouldn't just use git for that?
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by taneq on Sunday July 18, 2021 @08:04PM (#27877880)
<laughs in Windows 3.1>
Re:An app for M1 Macs that plays the sound of a fan as CPU u... by user-the-name on Sunday July 18, 2021 @06:27PM (#27877249)
UIView animations do not run on the main thread, and will not be blocked if the main thread is blocked. This does help a bit with keeping the OS feeling smooth, but it is far from the only reason.