fix(webnsupdate): reduce binary size #27

Merged
jalil merged 1 commit from reduce-bin-size into main 2024-12-22 00:56:10 +01:00
Owner

There is no need to compile for speed of execution, this is not a contested component.

There is no need to compile for speed of execution, this is not a contested component.
jalil self-assigned this 2024-12-22 00:51:27 +01:00
jalil added 1 commit 2024-12-22 00:51:27 +01:00
fix(webnsupdate): reduce binary size
All checks were successful
/ build (push) Successful in 1m10s
/ check (push) Successful in 28s
/ report-size (push) Successful in 7s
595961aa51
There is no need to compile for speed of execution, this is not a
contested component.
First-time contributor

Flake output sizes

Definitions:

  • Name: the name of the package/configuration.
  • Size: the closure size (size on disk/NAR size + all transitive dependencies).
  • NAR Size: the size of the build output (package without the dependencies).
  • [NAR] Size Change: the amount changed compared to the main branch.

Tips on reading this data:

  • For NixOS configurations you generally care only about the Size (closure size/size on disk).
    • Reduce the Size by disabling unneeded services/default packages.
  • For Packages you care about both the Size and the NAR Size.
    • Reduce the NAR Size by reducing the size of the build outputs, e.g. don't copy unnecessary data to the $out dir, optimize binaries for size, etc.
    • Reduce the Size by reducing the dependencies (e.g. buildInputs).
    • Don't worry too much about size, some dependencies are deduplicated, e.g. glibc adds ~40MiB to the Size, but is generally shared by ~every binary on the system, so, chances are, you are already including it from somewhere else and statically linking with e.g. musl is not gonna improve things.

Packages

Name Size Size Change NAR Size NAR Size Change
cargo-update 1.4Gi 0 848 0
default 35Mi -3.1Mi 3.2Mi -3.1Mi
webnsupdate 35Mi -3.1Mi 3.2Mi -3.1Mi
# Flake output sizes **Definitions:** - `Name`: the name of the package/configuration. - `Size`: the closure size (size on disk/NAR size + all transitive dependencies). - `NAR Size`: the size of the build output (package without the dependencies). - `[NAR] Size Change`: the amount changed compared to the main branch. **Tips on reading this data:** - For NixOS configurations you generally care only about the `Size` (closure size/size on disk). - Reduce the `Size` by disabling unneeded services/default packages. - For Packages you care about both the `Size` and the `NAR Size`. - Reduce the `NAR Size` by reducing the size of the build outputs, e.g. don't copy unnecessary data to the $out dir, optimize binaries for size, etc. - Reduce the `Size` by reducing the dependencies (e.g. `buildInputs`). - Don't worry too much about size, some dependencies are deduplicated, e.g. `glibc` adds ~40MiB to the `Size`, but is generally shared by ~every binary on the system, so, chances are, you are already including it from somewhere else and statically linking with e.g. `musl` is not gonna improve things. # Packages | Name | Size | Size Change | NAR Size | NAR Size Change | |------|-----:|------------:|---------:|----------------:| | `cargo-update` | 1.4Gi | 0 | 848 | 0 | | `default` | 35Mi | -3.1Mi | 3.2Mi | -3.1Mi | | `webnsupdate` | 35Mi | -3.1Mi | 3.2Mi | -3.1Mi |
jalil force-pushed reduce-bin-size from 595961aa51 to bd8badac23 2024-12-22 00:53:56 +01:00 Compare
First-time contributor

Flake output sizes

Definitions:

  • Name: the name of the package/configuration.
  • Size: the closure size (size on disk/NAR size + all transitive dependencies).
  • NAR Size: the size of the build output (package without the dependencies).
  • [NAR] Size Change: the amount changed compared to the main branch.

Tips on reading this data:

  • For NixOS configurations you generally care only about the Size (closure size/size on disk).
    • Reduce the Size by disabling unneeded services/default packages.
  • For Packages you care about both the Size and the NAR Size.
    • Reduce the NAR Size by reducing the size of the build outputs, e.g. don't copy unnecessary data to the $out dir, optimize binaries for size, etc.
    • Reduce the Size by reducing the dependencies (e.g. buildInputs).
    • Don't worry too much about size, some dependencies are deduplicated, e.g. glibc adds ~40MiB to the Size, but is generally shared by ~every binary on the system, so, chances are, you are already including it from somewhere else and statically linking with e.g. musl is not gonna improve things.

Packages

Name Size Size Change NAR Size NAR Size Change
cargo-update 1.4Gi 0 848 0
default 34Mi -3.5Mi 2.8Mi -3.5Mi
webnsupdate 34Mi -3.5Mi 2.8Mi -3.5Mi
# Flake output sizes **Definitions:** - `Name`: the name of the package/configuration. - `Size`: the closure size (size on disk/NAR size + all transitive dependencies). - `NAR Size`: the size of the build output (package without the dependencies). - `[NAR] Size Change`: the amount changed compared to the main branch. **Tips on reading this data:** - For NixOS configurations you generally care only about the `Size` (closure size/size on disk). - Reduce the `Size` by disabling unneeded services/default packages. - For Packages you care about both the `Size` and the `NAR Size`. - Reduce the `NAR Size` by reducing the size of the build outputs, e.g. don't copy unnecessary data to the $out dir, optimize binaries for size, etc. - Reduce the `Size` by reducing the dependencies (e.g. `buildInputs`). - Don't worry too much about size, some dependencies are deduplicated, e.g. `glibc` adds ~40MiB to the `Size`, but is generally shared by ~every binary on the system, so, chances are, you are already including it from somewhere else and statically linking with e.g. `musl` is not gonna improve things. # Packages | Name | Size | Size Change | NAR Size | NAR Size Change | |------|-----:|------------:|---------:|----------------:| | `cargo-update` | 1.4Gi | 0 | 848 | 0 | | `default` | 34Mi | -3.5Mi | 2.8Mi | -3.5Mi | | `webnsupdate` | 34Mi | -3.5Mi | 2.8Mi | -3.5Mi |
jalil merged commit bd8badac23 into main 2024-12-22 00:56:10 +01:00
jalil deleted branch reduce-bin-size 2024-12-22 00:56:10 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jalil/webnsupdate#27
No description provided.