by jagger27 · 5y ago · 0 comments
Electron has made it possible to use a lot of apps that otherwise wouldn't have been ported to Linux work with no hassle, and for that I'm grateful. I have only recently been able to comfortably run Linux full time. My dev experience on Linux is effectively identical to what I do on macOS: Docker, VSCode, Alacritty, and Discord (to talk to my team). Of course Discord and VSCode are both Electron apps, and Docker just lives on the command line. Alacritty, on the other hand, is an extremely interesting example to me, as it is a true native program that uses cross-platform GPU acceleration through OpenGL. I feel that route is overlooked as a path towards compatibility for a lot of programs outside of games.
* text entry
* file browsing & selection
* menus
* list/tree views
Like OpenGL, it also doesn't even provide an event loop or even an event (user input) layer.And then there's text... You've got to load a texture for every glyph of every point size used in the app for every font used in the app. Mind you, the OS already has a cache for this, but you don't have access to it, so that's more memory wasted. Which would be sizeable if every app on your system was using Japanese, or worse, Chinese, and making a copy of all this stuff.
Like, who cares if your app is rendering at 120 fps if it takes me 3 seconds to focus on a text field? I feel like that’s where most cross platform tooling has their work cut out.
We're not going to write renderers at a lower level than Cairo at any time in the foreseeable future.
Also, most of the issues with slow rendering are caused by your video interface driver and/or bugs in Cairo that we provide a few workarounds for already. Edit > Preferences > Appearance > Graphics Acceleration has two options ... you need to try all 4 possible combinations to exhaust the possibility that we've already solved the issue you are facing :)