Possible alternatives to Electron #58
Replies: 2 comments 1 reply
-
Hi there! Thanks a lot for this question, at some point I'll have to write a blog post on this issue, as it will pop up frequently, I guess 😄 I have indeed considered using various toolkits. I did a thorough test using Rust+Gtk4 and looked into iced, slint, tauri, and Qt (either using C++ or Python). All of them could be used, I guess. The Drawbacks of ElectronSo why did I choose Electron? Here are some potential drawbacks I considered:
The Benefits of ElectronOn the flip side, there are a couple of advantages which all boil down to one key advantage: Much higher development speed with Electron. I only have about one hour / day to spent on my open source projects. So this is extremely important! In just a few weeks (read: a couple of hours), I was able to set up a prototype which basically feels like Fly-Pie interactions-wise. Including touch and stylus support, fluent animations and neat transitions. With the other toolkits, I would still be trying to open a transparent top-level window when a hotkey is pressed (that is a bit exaggerated, but you get the point). Here are some of the reasons:
The Bottom LineSo using Electron for Kando does not seem to bring any drawbacks in terms of look-and-feel nor does it have a significant impact on the run-time performance. On the other hand, it brings a couple of important benefits! IMHO, it all boils down to the trade-off between memory usage and development speed. I think that it is well worth the couple of MB's. Is an additional 100 MB really an issue nowadays? I don't think so. After all, when choosing another toolkit, there would be a very realistic chance that Kando would never exist. I think if the rendering performance on Linux was better, tauri would be the perfect choice. It would combine the fast development cycle with the low memory footprint. However, it may not be suitable for Kando right now, but it may become suitable in the future! So I will regularly check if this changes. Porting from Electron to tauri at some point shouldn't be too hard. |
Beta Was this translation helpful? Give feedback.
-
Just tried this and have to admit, didn't know electron could even be used in this way, with the shaped window and fluent animations. It really has (on a modern desktop) splendid performance, but it does use quite a bit of memory: |
Beta Was this translation helpful? Give feedback.
-
Hi! First of all great job on all your previous work!
I would like to ask how decided you are on using Electron.
This is because you probably know there's a bit of negative preconception about Electron apps, in the GNU/Linux community. (that's where I'm coming from too)
Some parts where native toolkits shine:
On the less resource usage I would expand, that I discovered Kando on remembering how cool Gnome-Pie was, and being a bit down with Fly-Pie only working on Gnome, when I thought testing it on the PinePhone Pro, running Plasma Mobile with Wayland. If there was such a menu, always running and frequently opened, on a phone like that, Electron would drain the device a good bit.
I also got even a bit more excited, when seeing the name start with a K, but then I saw Electron, and now I'm writing this.
What I would recommend is either QT or GTK (or some offshoots like libadwaita or Kirigami)
Anyway, your project, your decision, just thought I'd ask. Also, good luck with it!
Beta Was this translation helpful? Give feedback.
All reactions