Closed psstoyanov closed 1 year ago
Thanks. Both issues need to be investigated.
Understandably, it doesn't work with flutter-elinux however this is interesting:
Fixed.
Understandably, it doesn't work with flutter-elinux however this is interesting:
Fixed.
Absolutely amazing!
I will try to look at the method you've used for --analyze-size
and see if it can give me ideas on how to pass flutter-embedded-linux variables to build and run command.
With the fix to --analyze-size
it's now easier to see a patter:
$ flutter-elinux build elinux --analyze-size
...
...
Building an eLinux application with wayland backend in release mode for x64 target... 19.4s
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
bundle 28 MB
bundle/
test_analyze 113 KB
data/
icudtl.dat 10 MB
flutter_assets 362 KB
lib/
libflutter_engine.so 14 MB
libflutter_elinux_wayland.so 896 KB
libapp.so (Dart AOT) 3 MB
Dart AOT symbols accounted decompressed size 3 MB
vs the GTK Linux build:
$ flutter-elinux build linux --analyze-size
...
...
Building Linux application...
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
bundle 20 MB
bundle/
test_analyze 28 KB
data/
icudtl.dat 796 KB
flutter_assets 2 MB
lib/
libflutter_linux_gtk.so 14 MB
libapp.so (Dart AOT) 3 MB
Dart AOT symbols accounted decompressed size 3 MB
icudtl.dat
is larger with flutter-elinx while the assets
are smaller.
As a note, the above 2 readings were gather with the default project:
flutter-elinux create <project_name>
icudtl.dat is one of the flutter engine build artifacts. The engine build options may have an effect. Current build options: https://github.com/sony/flutter-embedded-linux/wiki/Building-Flutter-Engine-from-source
I'm waiting for a build to complete with: https://github.com/flutter/engine/blob/main/ci/builders/linux_host_engine.json#L184
Not sure if that's comparable but it seemed like a good idea to start with whatever the main CI builder uses and then drone to the next option.
Hmm.... I don't get it - I always get 10MB for icudtl.dat in the resulting local build regardless of architecture or options for any Linux output.
How is it that the officially released GTK build has a footprint of just a few KB :confused:
Update: I believe this is the source of information relevant to the above observations: https://flutter-review.googlesource.com/c/recipes/+/9740
Ohhh... the GTK wrapper doesn't need to bundle fontconfig
as it's already part of the GTK deps - https://github.com/flutter/engine/pull/23663#issuecomment-759848028
Anecdotal comparison with fontconfig
package on my x64 tower (Plasma) being roughly 1100 KiB in size, appears to be in the right ball-park in terms of size.
I'm not sure if the above would have anything to do with a potential Wayland session for flutter-elinux
but it might have something to do with the fonts not being rendered in debug mode.
I don't believe there is something else that may be discovered by this ticket, @HidenoriMatsubayashi . Closing it down.
Thanks, @psstoyanov
Hi, I'm looking at a few of the commands and how elinux is extending the default Flutter ones.
--analyze-size
caught my eye.Understandably, it doesn't work with flutter-elinux however this is interesting: icudtl.dat with flutter-elinux has a size of 10MB:
Comparing this with the generic GTK wrapper:
Why would there be such a drastic difference in the size between the two files?