---
title: "Making devenv start fast, and the whole nixpkgs with it"
url: https://daily.dev/posts/making-devenv-start-fast-and-the-whole-nixpkgs-with-it-acjj6izku
source_url: https://devenv.sh/blog/2026/06/26/making-devenv-start-fast-and-the-whole-nixpkgs-with-it
type: article
source: "Lobsters"
published: 2026-06-27T09:06:21.864Z
updated: 2026-06-27T12:19:46.051Z
reading_time: 15
upvotes: 2
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Making devenv start fast, and the whole nixpkgs with it

**[Lobsters](https://daily.dev/sources/lobsters)** · 15 min read · 2 upvotes · 0 comments

## Summary

A deep dive into the 'stat storm' problem in Nix, where the dynamic loader makes hundreds of failing openat() syscalls before a program even starts. The root cause is Nix's per-package store layout requiring long DT_RUNPATH lists in ELF headers, causing O(N×M) failed library searches. Five approaches are analyzed: absolute DT_NEEDED paths (fast but breaks LD_LIBRARY_PATH overrides), RUNPATH symlink farms (preserves overrides but can't handle duplicate sonames), per-DSO ELF note caches (best tradeoffs but requires glibc patch), Guix-style per-package ld.so.cache (breaks cross-compilation), and static linking with musl (drops devenv from 70ms to 16ms but not a general fix). The chosen solution is the ELF note cache, now shipped in patchelf 0.19.0, with a nixpkgs PR pending to enable it across the whole package set. The goal is eventually upstreaming the glibc loader patch.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://devenv.sh/blog/2026/06/26/making-devenv-start-fast-and-the-whole-nixpkgs-with-it>

## Similar posts on daily.dev

- [Nix needs relocatable binaries](https://daily.dev/posts/nix-needs-relocatable-binaries-rlipayhxa) · Farid Zakaria’s Blog · 0 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/making-devenv-start-fast-and-the-whole-nixpkgs-with-it-acjj6izku)
