https://github.com/calinou/godot-size-benchmarks
Benchmarks to compare Godot binary sizes with different build-time options
https://github.com/calinou/godot-size-benchmarks
benchmark binary-size godot godot-engine
Last synced: about 1 year ago
JSON representation
Benchmarks to compare Godot binary sizes with different build-time options
- Host: GitHub
- URL: https://github.com/calinou/godot-size-benchmarks
- Owner: Calinou
- License: mit
- Created: 2019-04-06T11:45:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T19:11:31.000Z (over 5 years ago)
- Last Synced: 2025-03-16T21:11:18.261Z (about 1 year ago)
- Topics: benchmark, binary-size, godot, godot-engine
- Language: Nim
- Homepage:
- Size: 15.6 KB
- Stars: 39
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Godot Size Benchmarks
This repository contains a program that compiles Godot export templates with
various settings to decrease file size.
## Results
The results below were generated on Fedora 30 with GCC 9.1.1 from the Godot
3.1.1 stable source code. All binaries had their debug symbols stripped.
- **`full`** builds have all modules enabled.
- **`micro`** builds have commonly-used modules enabled (such as mbedTLS or
Theora/WebM); lesser-used modules are disabled.
- **`pico`** builds have all modules disabled and are optimized for size instead
of speed.
- Builds with a **`_2d`** suffix have 3D support disabled.
Check the [build script](src/godot_size_benchmarks.nim) for the list of SCons
flags used by each build type.
| Platform | Build type | Size (uncompressed) | Size (compressed) |
| -------: | -------------- | ------------------- | ----------------- |
| Android | `full` | 11.8 MB | 11.8 MB |
| Android | `full_2d` | 9.5 MB | 9.5 MB |
| Android | `micro` | 9.8 MB | 9.8 MB |
| Android | `micro_2d` | 8.5 MB | 8.5 MB |
| Android | `pico` | 8.1 MB | 8.1 MB |
| Android | `pico_2d` | 7.1 MB | 7.1 MB |
| HTML5 | `full` | 13.0 MB | 4.0 MB |
| HTML5 | `full_2d` | 11.3 MB | 3.4 MB |
| HTML5 | `micro` | 11.5 MB | 3.4 MB |
| HTML5 | `micro_2d` | 10.2 MB | 3.1 MB |
| HTML5 | `pico` | 10.9 MB | 3.2 MB |
| HTML5 | `pico_2d` | 9.7 MB | 2.9 MB |
| Linux | `full` | 30.9 MB | 12.0 MB |
| Linux | `full_2d` | 25.9 MB | 10.0 MB |
| Linux | `micro` | 27.3 MB | 10.4 MB |
| Linux | `micro_2d` | 23.4 MB | 9.0 MB |
| Linux | `pico` | 15.7 MB | 6.0 MB |
| Linux | `pico_2d` | 13.5 MB | 5.1 MB |
| Windows | `full` | 26.7 MB | 10.2 MB |
| Windows | `full_2d` | 22.5 MB | 8.6 MB |
| Windows | `micro` | 23.7 MB | 9.0 MB |
| Windows | `micro_2d` | 20.2 MB | 7.7 MB |
| Windows | ~~`pico`~~ | *(build failing)* | *N/A* |
| Windows | ~~`pico_2d`~~ | *(build failing)* | *N/A* |
### Platform-specific notes
- **Android:** Android APK sizes were measured after building for `armv7` only,
which means only one architecture was included in the APK. Android APKs are
already compressed on creation, hence the compressed size being identical to
the uncompressed size.
- **HTML5:** Displayed file sizes only include the main WebAssembly blob. The
accompanying JavaScript file's size (330 KB uncompressed, 75 KB gzipped)
remains mostly constant. Compressed sizes were measured by compressing the
WebAssembly blob with `gzip -6`, which is the compression level used on most
Web servers (after enabling compression for `.wasm` files).
- **Linux:** Binaries were compiled with link-time optimization enabled.
Compressed sizes were measured by creating ZIP archives using
`7z a -mx9 .zip `.
- **Windows:** Binaries were compiled using MinGW with link-time optimization
enabled. Compressed sizes were measured by creating ZIP archives using
`7z a -mx9 .zip `.
## Running the benchmark locally
**Note:** The benchmark runner currently only supports Linux.
### Pre-requisites
- [Nim](https://nim-lang.org/) 0.20.0 or later (can be installed via
[choosenim](https://github.com/dom96/choosenim)).
- Godot build dependencies set up for
[Android](http://docs.godotengine.org/en/latest/development/compiling/compiling_for_android.html),
[HTML5](https://docs.godotengine.org/en/latest/development/compiling/compiling_for_web.html),
[Linux](https://docs.godotengine.org/en/latest/development/compiling/compiling_for_x11.html) and
[Windows](https://docs.godotengine.org/en/latest/development/compiling/compiling_for_windows.html) (MinGW).
- This Git repository **(with submodules initialized)**.
### Running
```bash
git clone --recursive https://github.com/Calinou/godot-size-benchmarks.git
cd godot-size-benchmarks/
nimble run
```
Wait for the script to build all binaries; they will be available in the
`godot/bin/` directory.
## Resources
- [Optimizing a build for size](http://docs.godotengine.org/en/latest/development/compiling/optimizing_for_size.html)
in the Godot documentation.
- [Multiple APK support in Google Play](https://developer.android.com/google/play/publishing/multiple-apks)
to publish one APK per CPU architecture, greatly reducing the file size.
## License
Copyright © 2019 Hugo Locurcio and contributors
Unless otherwise specified, files in this repository are licensed under the MIT
license; see [LICENSE.md](LICENSE.md) for more information.