4 ms·
> On total whimsy, I tried Flutter. I downloaded it, and built "Hello World" for macOS. Not only did it take an eternity to compile (on my modern, SSD enabled,
by DomesticMouse 4y ago
> On total whimsy, I tried Flutter. I downloaded it, and built "Hello World" for macOS. Not only did it take an eternity to compile (on my modern, SSD enabled, eleventy gigablip iMac), the result was 108MB. And that was just for the Mac version, I'd need 2 others for Linux and Windows. The compile time was glacial (I know, its got hot reloading to speed things up).
I'm curious how you got 108mb. Here's what I'm seeing:
$ flutter --version
Flutter 3.0.4 • channel stable •
https://github.com/flutter/flutter
Framework • revision 85684f9300 (7 days ago) • 2022-06-30 13:22:47 -0700
Engine • revision 6ba2af10bb
Tools • Dart 2.17.5 • DevTools 2.12.2
$ flutter create hello_world && cd hello_world
Creating project hello_world...
Running "flutter pub get" in hello_world... 1,764ms
Wrote 127 files.
All done!
In order to run your application, type:
$ cd hello_world
$ flutter run
Your application code is in hello_world/lib/main.dart.
$ flutter build macos
Building with sound null safety
Building macOS application...
$ du -ah build/macos/Build/Products/Release/hello_world.app | tail -1
44M build/macos/Build/Products/Release/hello_world.app
Note, the release build is significantly smaller than the debug build, which includes a full Dart VM for hot swapping application code:
$ flutter build macos --debug
Building with sound null safety
Building macOS application...
$ du -ah build/macos/Build/Products/Debug/hello_world.app | tail -1
98M build/macos/Build/Products/Debug/hello_world.app
Note, on the glacial compiles, here is what I'm seeing on my M1 mac laptop:
$ time flutter build macos
Building with sound null safety
Building macOS application...
flutter build macos 1.20s user 0.59s system 47% cpu 3.801 total
It's slower than building web pages in vim, but this is comparable with compiling desktop applications in Xcode.
Disclosure: I'm a Developer Relations Engineer for Flutter
- cercatrova 4y ago44 megabytes is still quite large, is what the parent is trying to say. I don't know enough about binary sizes but it seems that it could be smaller.
- izacus 4y agoNo, the parent is trying to say that hello world is 108MB which is not true at all. Hard to make a good point about binary size when they outright lie.
- discreteevent 4y agoLooks like they probably didn't lie but built the debug version by mistake.
- cercatrova 4y agoI mean sure, but I presume they weren't talking directly about the exact size but that other desktop apps can be built for (at least) an order of magnitude fewer megabytes. In other words, it's not exactly 108MB that they really care about, it's that Qt or other frameworks could make a hello world app at 10MB. That's how I interpreted their comments anyway.
- DomesticMouse 4y agoIf you want a sneak preview of the functionality that can be delivered in Flutter at about the 100mb mark, sign up for the beta of https://www.superlist.com/ https://www.superlist.com/
- cercatrova 4y agoWell if it's as laggy as your homepage then that's not saying much. On my phone I can't even scroll down without lagging.