Hasty Briefsbeta

Bilingual

Determinate Nix 3.5: introducing lazy trees

a year ago
  • #Performance
  • #Nix
  • #DevOps
  • Lazy trees have been introduced in Determinate Nix version 3.5.2, based on upstream Nix 2.28.3.
  • Lazy trees improve efficiency in large repositories, especially monorepos, by reducing evaluation time and disk usage.
  • Initial release is opt-in only for cautious adoption.
  • Lazy trees scope file copying to only what is needed, using a virtual filesystem to minimize unnecessary operations.
  • Performance improvements include up to 3x faster evaluation and 20x less disk usage in some cases.
  • Example provided shows a reduction from 304MB to 13MB in disk usage with lazy trees enabled.
  • CI comparisons demonstrate significant performance gains, with evaluation time dropping from 11 seconds to 3.5 seconds.
  • A new warning is introduced for inefficient source specifications in derivations, recommending better practices.
  • Instructions for upgrading or installing Determinate Nix are provided for macOS and Linux.
  • Future improvements planned include better evaluation caching, parallel evaluation, and multi-threaded unpacking of flakes.