Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Use Qt features configure system to reduce the wasm file size to reduce time it takes to download app.
Sample binary sizes
Example | gzip | brotli |
---|---|---|
helloglwindow (QtCore + QtGui) | 2.8M | 2.1M |
wiggly widget (QtCore + QtGui + QtWidgets) | 4.3M | 3.2M |
SensorTag (QtCore + QtGui + QtWidgets + QtQuick + QtCharts) | 8.6M | 6.3M |
It is important to distinguish between size-after-compilation, and compressed download size.
Tools
wasm-strip, from Wabt (https://github.com/WebAssembly/wabt)
twiggy: code size profiler (https://github.com/rustwasm/twiggy)
Configure system options
-no-mimetype-database (savings: 200 - 300 kb). We could possibly disable it by default, see https://codereview.qt-project.org/#/c/257764/