Hacker News new | ask | show | jobs
by GranPC 1858 days ago
I'm personally very excited about Megapixels (the camera app) being ported to GTK4. With GTK4's graphics acceleration support, I expect that the UI of these phones will get a lot smoother once most of the apps are running on GTK4.
2 comments

What I can't figure out is how Phosh on PinePhone could take 5 seconds just to open a window e.g. to turn wifi on/off, when the Nokia N900, also a GTK-based system and running on more primitive hardware, managed to have a very snappy and responsive UI. Surely this can't be a matter of mere graphics acceleration, there must be a great deal of bloat in all the underlying libraries.
Idk why phosh is so slow on the pinephone. Just about any other (x11 anyway) DE was fast on it even before the updated drivers a few months ago.

I think the other issue though is that on the nokia GTK was still built with software rendering in mind whereas modern graphics toolkits tend to do the "everything has OpenGL and stuff without it can use LLVMPIPE" thing which results in very poor performance on incompatible hardware (along with less than optimal drawing in order to fit the abstraction.)

Something I also want to investigate -- CPU is at 100% on 1 core for 5~ seconds when launching anything. Not even waiting for IO, it's mostly user time
There were some shader caching patches mainlined recently to mesa, I think, and some improvements went to gtk4, too.

https://www.phoronix.com/scan.php?page=news_item&px=Mesa-Lim...

Pretty much nothing in phosh (aside of small amount of third party apps since very recently) uses GTK4 yet, and GTK3 did not use mesa at all.
Maemo 5 was (mostly) based on GTK2, and GTK3 so far was never running on such underpowered hardware, so you're most likely seeing plenty of bottlenecks that nobody really looked into optimizing because they weren't bottlenecking anything on hardware the devs used. It's even much snappier on the Librem 5 (which has almost three times as fast RAM as the PinePhone) without any changes whatsoever.

Also, it does take about 3-4 seconds to open the settings app on my Nokia N900 as well - it just makes it seem like it opens instantly with a splash screen that mimics the open app :)

I'm migrating my toy HN app to GTK4 as well, it's not always free performance though, the pp GPU is extremely bad, even worse than the CPU. My app actually was slower on GTK4, although removing rounded corners and shadows as the devs recommended actually made it a lot faster than the GTK3 version.
Hmm... I wonder if those expensive effects could be cached to a texture atlas to mitigate the performance impact. Hopefully the devs are looking into it!