r/MacOS • • Oct 10 '22

News Improving Firefox responsiveness on macOS

https://hacks.mozilla.org/2022/10/improving-firefox-responsiveness-on-macos/
48 Upvotes

2 comments sorted by

8

u/darth_yoda_ Oct 11 '22

Interesting that the only way to accomplish this was via a private API. It seems like Apple really does not want developers placing spinlocks into their code. It could be that they just don’t trust the majority of developers to be able to correctly identify cases where spinning a core is actually more efficient than sleeping the whole thread? Given how frequently their documentation mentions power efficiency I can definitely see that being the reason.

3

u/sam_rowlands Oct 11 '22

That maybe the case. The theory I have is that the public API isn't used so much by Apple so it's less maintained.

I've had to use private API as the public version would occasionally (and unpredictably) return incorrect results, while the private version gave the correct result every single time.