nix-bundle icon indicating copy to clipboard operation
nix-bundle copied to clipboard

Faster startup by prelinking

Open jb55 opened this issue 8 years ago • 2 comments

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.

jb55 avatar May 03 '17 19:05 jb55

How does one prelink a bundle?

probonopd avatar May 03 '17 19:05 probonopd

I figure you would run prelink on the binary built by nix before it is bundled.

jb55 avatar May 03 '17 19:05 jb55