Performance regression in the debugger to the point of not working on nixpkgs? #165

Closed
opened 2024-03-20 07:39:25 +00:00 by jade · 5 comments
Owner

We were trying to debug #1 with the following procedure on some local version:

dev/nixpkgs » time nix eval --debugger --ignore-try -f . nixosTests.misc.outPath
error: interrupted by the user
nix eval --debugger --ignore-try -f . nixosTests.misc.outPath  130.77s user 22.77s system 99% cpu 2:34.08 total

(ran out of patience)

Compare to nix 2.18.2:

dev/nixpkgs » time result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPath
"/nix/store/pam5fcnrrm492lz4r040n6zkpfk9mbgz-vm-test-run-misc"
result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPath  12.37s user 0.95s system 94% cpu 14.025 total

Given that this seems to not happen with nix 2.18.2, this seems regression shaped.

We were trying to debug #1 with the following procedure on some local version: ``` dev/nixpkgs » time nix eval --debugger --ignore-try -f . nixosTests.misc.outPath error: interrupted by the user nix eval --debugger --ignore-try -f . nixosTests.misc.outPath 130.77s user 22.77s system 99% cpu 2:34.08 total ``` (ran out of patience) Compare to nix 2.18.2: ``` dev/nixpkgs » time result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPath "/nix/store/pam5fcnrrm492lz4r040n6zkpfk9mbgz-vm-test-run-misc" result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPath 12.37s user 0.95s system 94% cpu 14.025 total ``` Given that this seems to not happen with nix 2.18.2, this seems regression shaped.
jade added the
bug
release-blocker
labels 2024-03-20 07:39:38 +00:00
Author
Owner

also on 5a28d70d1e

dev/nixpkgs » time ~/lix/result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPath
error: interrupted by the user
~/lix/result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPat  255.44s user 17.29s system 99% cpu 4:33.52 total
also on 5a28d70d1e340ff5acccf754b46f035cc6beacf3 ``` dev/nixpkgs » time ~/lix/result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPath error: interrupted by the user ~/lix/result/bin/nix eval --debugger --ignore-try -f . nixosTests.misc.outPat 255.44s user 17.29s system 99% cpu 4:33.52 total ```
Author
Owner

observed not reproducing in nix 2.20.5.

observed *not* reproducing in nix 2.20.5.
pennae self-assigned this 2024-03-20 12:33:56 +00:00
Owner

bisect blames 86a1121d16. missing & in a bit of code only debugger ever hits really hard.

https://gerrit.lix.systems/c/lix/+/593

bisect blames 86a1121d16f7eeb594955e39ff4e6fcd69f1b8c5. missing `&` in a bit of code only debugger ever hits really hard. https://gerrit.lix.systems/c/lix/+/593
Author
Owner

looking at the results afterwards, we are now at 19.5s compared to nix 2.20.5's 14.4s and nix 2.18's 12.8s. still could probably use some optimization but it works, so shrug.

looking at the results afterwards, we are now at 19.5s compared to nix 2.20.5's 14.4s and nix 2.18's 12.8s. still could probably use some optimization but it *works*, so shrug.
Owner

the debugger is definitely going to take a hit for time being due to all the source reparsing it does in the new position system (and nix 2.21, or whatever merged our positions changes, will too). at this level of overhead we're not very concerned, but eval performance itself is probably something we should take a closer look at before release :/

the debugger is definitely going to take a hit for time being due to all the source reparsing it does in the new position system (and nix 2.21, or whatever merged our positions changes, will too). at this level of overhead we're not very concerned, but eval performance itself is probably something we should take a closer look at before release :/
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#165
No description provided.