|
|
|
|
|
by DomesticMouse
1443 days 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 |
|