merge queue: embarking 2.29-maintenance (56069a9), #13590, #13580, #13599, #13594 and #13586 together#13661
Closed
mergify[bot] wants to merge 12 commits into2.29-maintenancefrom
Closed
merge queue: embarking 2.29-maintenance (56069a9), #13590, #13580, #13599, #13594 and #13586 together#13661mergify[bot] wants to merge 12 commits into2.29-maintenancefrom
mergify[bot] wants to merge 12 commits into2.29-maintenancefrom
Conversation
For heavier objects it doesn't make sense to return a std::optional with the copy of the data, when it can be used by const reference. (cherry picked from commit 4711720)
Previous code had a sneaky bug due to which no caching
actually happened:
```cpp
auto linesForInput = (*lines)[origin->offset];
```
That should have been:
```cpp
auto & linesForInput = (*lines)[origin->offset];
```
See [1].
Now that it also makes sense to make the cache bound in side
in order not to memoize all the sources without freeing any memory.
The default cache size has been chosen somewhat arbitrarily to be ~64k
origins. For reference, 25.05 nixpkgs has ~50k .nix files.
Simple benchmark:
```nix
let
pkgs = import <nixpkgs> { };
in
builtins.foldl' (acc: el: acc + el.line) 0 (
builtins.genList (x: builtins.unsafeGetAttrPos "gcc" pkgs) 10000
)
```
(After)
```
$ hyperfine "result/bin/nix eval -f ./test.nix"
Benchmark 1: result/bin/nix eval -f ./test.nix
Time (mean ± σ): 292.7 ms ± 3.9 ms [User: 131.0 ms, System: 120.5 ms]
Range (min … max): 288.1 ms … 300.5 ms 10 runs
```
(Before)
```
hyperfine "nix eval -f ./test.nix"
Benchmark 1: nix eval -f ./test.nix
Time (mean ± σ): 666.7 ms ± 6.4 ms [User: 428.3 ms, System: 191.2 ms]
Range (min … max): 659.7 ms … 681.3 ms 10 runs
```
If the origin happens to be a `all-packages.nix` or similar in size then the
difference is much more dramatic.
[1]: https://www.github.com/lix-project/lix/commit/22e3f0e9875082be7f4eec8e3caeb134a7f1c05f
(cherry picked from commit 5ea81f5)
the second equivalence, using a if-else expression, aligns much closer to how most humans think about implication, adding it might help some people :) (cherry picked from commit 51151c2)
(cherry picked from commit f627b8c)
Commit b36637c set `__ETC_PROFILE_NIX_SOURCED` globally, but this is not enough to prevent the script from being run again by child shells, because the variable was not exported and thus not inherited by any child process. Exporting the variable also agrees with the bash scripts. Notably, the old behavior broke `nix develop -c fish` in some cases, because the profile bin directory got prepended to the path, causing binaries from the profile to override binareis from the devshell. (cherry picked from commit b9ed3ae)
(cherry picked from commit d8da8f0)
(cherry picked from commit d07852b)
|
Hi @mergify[bot], I noticed you've been keeping docs up-to-date, always good to see. I built a small GitHub app for keeping high-level docs (SDK guides, API references, examples, tutorials, etc.) up-to-date whenever you commit changes. No pressure, just thought it might be useful. It's free for OSS: https://github.com/marketplace/deepdocsai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 This pull request has been checked successfully and will be merged soon. 🎉
Branch 2.29-maintenance (56069a9), #13590, #13580, #13599, #13594 and #13586 are embarked together for merge.
This pull request has been created by Mergify to speculatively check the mergeability of #13586.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue
defaultfor merge:check-success=installer test on macoscheck-success=installer test on ubuntucheck-success=tests on macoscheck-success=tests on ubuntucheck-success=vm_testscheck-success = installer test on macoscheck-neutral = installer test on macoscheck-skipped = installer test on macoscheck-success = installer test on ubuntucheck-neutral = installer test on ubuntucheck-skipped = installer test on ubuntucheck-success = tests on macoscheck-neutral = tests on macoscheck-skipped = tests on macoscheck-success = tests on ubuntucheck-neutral = tests on ubuntucheck-skipped = tests on ubuntuRequired conditions to stay in the queue:
check-success = installer test on macoscheck-neutral = installer test on macoscheck-skipped = installer test on macoscheck-success = installer test on ubuntucheck-neutral = installer test on ubuntucheck-skipped = installer test on ubuntucheck-success = tests on macoscheck-neutral = tests on macoscheck-skipped = tests on macoscheck-success = tests on ubuntucheck-neutral = tests on ubuntucheck-skipped = tests on ubuntu