r/FlutterDev • u/[deleted] • Oct 12 '21
Article Desktop performance deep dive: Flutter vs Electron
https://getstream.io/blog/flutter-desktop-vs-electron/15
u/FormerGameDev Oct 13 '21 edited Oct 13 '21
This will be an interesting conversation once production Flutter desktop apps start surfacing.
Yeah, probably should've just started and ended with that sentence.
Let's compare two completely different things, that achieve, ultimately, two nearly completely different things, one of which no one is actually using, to see which one does .. what.. better?
... edit: just realized i'm in the FlutterDev sub posting this. Oops. Apologies if my tone comes off incredibly poorly, but I just don't really see the point of having a comparison, when all you can really compare is Hello, World.
If your choices of platforms come down to how fast something starts and how small it's installation is, you're probably not really interested in either of these.
20
u/kitanokikori Oct 13 '21
Yeah they forgot the comparison "Typing in a text box":
Electron:
Works
Flutter Desktop:
Absolutely does not work
I like Flutter but right now its desktop product is completely unusable
2
u/dancovich Oct 13 '21
In what circumstances typing in a text box doesn't work in Flutter Desktop?
I just made a small app for a friend and used Flutter. There's a text box in the app and it does work.
Since it's only one, maybe I'm not hitting a bug? Do you know how to trigger it?
2
u/kitanokikori Oct 13 '21
On Windows the last time I tried, literally keys as simple as backspace doesn't work. Things like IME input (i.e. being able to type in Chinese/Japanese/Korean) or support for Deadkeys (i.e. all of Europe) absolutely do not. This might not be a dealbreaker for OSS or hobby projects, but for anything professional that is 100% unusable
2
u/dancovich Oct 13 '21
At least on Flutter 2.5.2 and a Windows app, all keys I tried worked, including backspace. I can't test the other things you mentioned though.
It's still in beta and the Flutter team doesn't recommend using Flutter Desktop in production, so I expect those things to get fixed with time.
-2
Oct 13 '21
I’m going for it: I expect Flutter to be discontinued before it gets “production” Desktop support.
This was a hobby project at Google that took off, but still has major cross-platform issues (iOS jank has barely even been acknowledged, let alone fixed, this thread is debating keypresses, KEYPRESSES!).
It is not a revenue driver for Google at all, and they will simply nope out at some point in the future. They’ve done it before, they’ll do it again.
Forget about Flutter Desktop, I wouldn’t even be writing anything in Flutter right now.
Disclosure: have written small cross platform apps in flutter, find it generally enjoyable to use but can’t stand the fanboyism in the community.
7
u/dancovich Oct 13 '21
I think you're wrong about Google commitment to the project, but even if you're right, the entire Flutter ecosystem is open source, so there is absolutely nothing keeping the OSS community to just continue work on it. That's different than Google's closed source projects where if they drop it then it's dropped.
We are discussing key presses on a platform Flutter doesn't officially support yet, so I don't know why it's so jarring that a beta product has bugs.
Disclosure: I work at a company that has several Flutter apps already in production, many of them developed by me. Would I recommend Flutter for desktop right now? Hell no, I don't even trust it for web apps which are technically out of beta. Doesn't mean that what Flutter can already do isn't done well.
2
u/ventrix334 Apr 16 '22
Open source does not mean "access to everything". Some parts might fall under different licenses. Open source does also not mean "I can use whatever I want however I want it".
Don't forget that Flutter is deeply coupled with Skia and even the Flutter team itself struggles with keeping them in sync and implementing skia features (we still lack very simple GPU stuff like shader programming, even though Skia has the APIs for it for YEARS)2
u/dancovich Apr 16 '22
Open source does not mean "access to everything". Some parts might fall under different licenses
There is access (simply being able to see the code) and there is usage. Open source does mean you have access to everything that is open source. If you have no access to a part, then that part isn't open source.
But as you said, it doesn't mean you can use it however you want. In Flutter's case it's a moot point because it is under BSD- which is extremely permissive, the only caveat is that the name of the project (Flutter) can't be used by forks. So if the project ever dies, it can easily be reborn under a different name.
Don't forget that Flutter is deeply coupled with Skia
Also licensed under BSD-3, so it's not really a problem. Dart is also BSD-3. As far as I know, no core component of Flutter is stuck behind any problematic licenses, so the point I made that the community can just continue work on the framework is totally valid.
3
u/Baul Oct 13 '21
Flutter is the "native" UI toolkit for Fuchsia, which is decidedly not just a hobby project.
Feel free to write off Flutter, we'll see you in five years.
1
u/ventrix334 Apr 16 '22
Fuchsia itself is a little prototype project though (since 2015!). It has as of yet absolutely no use case or actual concept behind it.
Also Fuchsia is not dependant on Flutter at all. You are able (in theory, as of right now you cannot) to write apps in Flutter for it as you can with Java, Swift, javascript, Rust and so on. Fuchsia + Flutter is a little COPIUM from the Flutter community to feel more safe.
2
u/Zarkex01 Jul 11 '24
"Prototype project" used by BMW, Philips Hue, Sonos, Google Wallet, eBay, Alibaba, Tencent etc.
1
u/ventrix334 Jul 27 '24
None of them use Fuchsia (especially not 2 y ago). We are talking about Fuchsia, not Flutter.
1
u/Baul Apr 16 '22 edited Apr 17 '22
Also Fuchsia is not dependant on Flutter at all. You are able (in theory, as of right now you cannot) to write apps in Flutter for it as you can with Java, Swift, javascript, Rust and so on. Fuchsia + Flutter is a little COPIUM from the Flutter community to feel more safe.
Sure, in the same sense that Android isn't dependent on Java/Kotlin at all. You are able to write apps in Flutter, React Native, Electron, etc. The "native" apps for Android always have been and always will be Java/Kotlin, just like Fuchsia is designed for having native Flutter apps.
Unless you really find those Android apps in ChromeOS to be "native," you know this argument is BS.
0
Oct 13 '21
Flutter is “a” native UI toolkit for fuschia
4
u/Baul Oct 13 '21
Flutter is the UI toolkit for Fuchsia.
Fuchsia has the ability to run Android apps via ART, just like it can run web apps via a browser, but if you want to write an app for Fuchsia, Flutter is the toolkit.
1
-3
u/FormerGameDev Oct 13 '21
I'm not familiar with it, came over here from a post to /r/electron. I thought perhaps "Oh, is Flutter a new 'make a desktop app with a browser' thing, or a new 'make a desktop app with v8' thing".. but.. no.. it's not even kind of sort of related to electron.
The baffling part to me, is that a comparison would make sense, if both of them shared literally any major feature, but this comparison is about as useless as comparing the execution time of a bubble sort in C++ to the time it takes to serve a network request in PHP, and attempting to draw some sort of conclusion from it.
As far as I can tell, the only similarity is that they both allow a developer to write code. And not in the same languages, or the same contexts.
2
Jul 17 '22
Flutter and Electron both allow you to create beautiful, highly customizable, cross-platform desktop applications. Some of the best desktop applications I’ve used have been Electron applications. The problem is that they are slow and use a ton of memory. If Flutter can address that while still allowing you to create beautiful user interfaces then it is highly intriguing.
2
u/razorree May 13 '24 edited Jun 05 '24
I see only horrible Electron apps, overly heavy and slow .... such apps a few years ago were weighting 1-10MB ... now >200-500MB .... it's a joke.
maybe VS Code is the only exception, which runs nicely and feels quite ok (or maybe because I have one of the fastest notebook CPU and 32GB of RAM now.... still, a joke)
1
Jun 05 '24
I generally agree. Discord feels pretty good in my experience as with MS Teams. Certainly not at the level of a native app but they also look a lot better. There just isn’t a good cross-platform UI framework right now.
1
u/FormerGameDev Jul 17 '22
9 months ago, there was no one / hardly anyone using it, and it wasn't useful for much of anything. I don't know how much that has changed in two major versions since then, but a casual google search doesn't really find anything.
It's also still a completely different thing entirely from Electron.
1
Jul 17 '22
It is certainly different from Electron but they fill similar roles on desktop. Adoption still isn’t great on desktop but I think it’s improving.
1
6
Oct 13 '21 edited Oct 13 '21
[removed] — view removed comment
2
Oct 13 '21
Electron is geared toward those who deliver web first and desktop later
Well, what you’ve just said is not only not provable, it’s not true. It’s your (incorrect) opinion.
1
Mar 10 '22
Lmfao thats exactly what Electron is. Want proof? Read the damn docs lol.
1
Jun 19 '24
It says in their docs that Electron is a solution for cross platform applications with single code base in JS
1
39
u/[deleted] Oct 12 '21
It's nice to finally see some numbers. It's no surprise that Flutter is more efficient than Electron, but for some use cases the difference was huge (2.2 GB Electron vs 170 MB Flutter).