nix-bundle
nix-bundle copied to clipboard
Faster startup by prelinking
prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases. Due to fewer relocations, the run-time memory consumption decreases as well (especially the number of unshareable pages). The prelinking information is only used at startup time if none of the dependent libraries have changed since prelinking; otherwise programs are relocated normally
According to the mailing list, this was not enabled in nixpkgs due to determinacy issues. That may not be an issue for bundles?
Here's also some discussion why it's not enabled by default in some distros: https://pagure.io/fesco/issue/1183, but again, those issues may not apply to nix-bundle?
Will need testing and benchmarking to see if it's worth it.
How does one prelink a bundle?
I figure you would run prelink on the binary built by nix before it is bundled.