nix-super/doc/manual/src/release-notes/rl-next.md
polykernel a382919d7d
primops: lazy evaluation of replaceStrings replacements
The primop `builtins.replaceStrings` currently always strictly evaluates the
replacement strings, however time and space are wasted for their computation
if the corresponding pattern do not occur in the input string. This commit
makes the evaluation of the replacement strings lazy by deferring their
evaluation to when the corresponding pattern are matched and memoize the result
for efficient retrieval on subsequent matches.

The testcases for replaceStrings was updated to check for lazy evaluation
of the replacements. A note was also added in the release notes to
document the behavior change.
2023-05-25 18:35:23 -04:00

684 B

Release X.Y (202?-??-??)

  • Speed-up of downloads from binary caches. The number of parallel downloads (also known as substitutions) has been separated from the --max-jobs setting. The new setting is called max-substitution-jobs. The number of parallel downloads is now set to 16 by default (previously, the default was 1 due to the coupling to build jobs).
  • The function builtins.replaceStrings is now lazy in the value of its second argument to, that is a replacee in to is only evaluated when its corresponding pattern in from is matched in the string s.