1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00
nix/src
Sergei Zimmerman 0823a0c6e1 {libexpr,libcmd}: Make debugger significantly faster
The underlying issue is that debugger code path was
calling PosTable::operator[] in each eval method.
This has become incredibly expensive since 5d9fdab3de.

While we are it it, I've reworked the code to
not use std::shared_ptr where it really isn't necessary.

As I've documented in previous commits, this is actually
more a workaround for recursive header dependencies now
and is only necessary in `error.hh` code.

Some ad-hoc benchmarking:

After this commit:

```
Benchmark 1: nix eval nixpkgs#hello --impure --ignore-try --no-eval-cache --debugger
  Time (mean ± σ):     784.2 ms ±   7.1 ms    [User: 561.4 ms, System: 147.7 ms]
  Range (min … max):   773.5 ms … 792.6 ms    10 runs
```

On master 3604c7c51:

```
Benchmark 1: nix eval nixpkgs#hello --impure --ignore-try --no-eval-cache --debugger
  Time (mean ± σ):     22.914 s ±  0.178 s    [User: 18.524 s, System: 4.151 s]
  Range (min … max):   22.738 s … 23.290 s    10 runs
```

(cherry picked from commit adbd08399c)
2025-03-24 16:05:32 +00:00
..
build-remote build-remote: only allocate storeUri once 2024-07-25 14:04:03 +02:00
external-api-docs Format .nix files 2025-01-24 20:37:38 +01:00
internal-api-docs Format .nix files 2025-01-24 20:37:38 +01:00
libcmd {libexpr,libcmd}: Make debugger significantly faster 2025-03-24 16:05:32 +00:00
libexpr {libexpr,libcmd}: Make debugger significantly faster 2025-03-24 16:05:32 +00:00
libexpr-c refactor: Extract EvalState::realiseString 2025-01-27 15:51:13 +00:00
libexpr-test-support Format .nix files 2025-01-24 20:37:38 +01:00
libexpr-tests Format .nix files 2025-01-24 20:37:38 +01:00
libfetchers Format .nix files 2025-01-24 20:37:38 +01:00
libfetchers-tests Format .nix files 2025-01-24 20:37:38 +01:00
libflake Format .nix files 2025-01-24 20:37:38 +01:00
libflake-tests Format .nix files 2025-01-24 20:37:38 +01:00
libmain Format .nix files 2025-01-24 20:37:38 +01:00
libmain-c Format .nix files 2025-01-24 20:37:38 +01:00
libstore Fix macos sandbox issue 2025-03-19 20:21:38 +00:00
libstore-c Format .nix files 2025-01-24 20:37:38 +01:00
libstore-test-support Format .nix files 2025-01-24 20:37:38 +01:00
libstore-tests Format .nix files 2025-01-24 20:37:38 +01:00
libutil libutil: Fix Pos::getSourcePath 2025-03-24 16:05:31 +00:00
libutil-c Format .nix files 2025-01-24 20:37:38 +01:00
libutil-test-support Format .nix files 2025-01-24 20:37:38 +01:00
libutil-tests MonitorFdHup: replace pthread_cancel trick with a notification pipe 2025-03-24 15:48:34 +01:00
nix Format .nix files 2025-01-24 20:37:38 +01:00
nix-build Fix issue 11892 2024-11-26 11:19:29 +00:00
nix-channel Format .nix files 2025-01-24 20:37:38 +01:00
nix-collect-garbage More std::filesystem for nix-collect-garbage 2024-08-26 17:29:23 -04:00
nix-copy-closure Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
nix-env Format .nix files 2025-01-24 20:37:38 +01:00
nix-instantiate No global settings in libnixfetchers and libnixflake 2024-07-12 08:50:28 -04:00
nix-store fix: Resolve CLI parent symlinks before adding to store 2025-01-07 06:03:57 +00:00
perl Format .nix files 2025-01-24 20:37:38 +01:00
nix-functional-tests Build Functional tests with Meson 2024-08-14 15:35:40 -04:00
nix-manual Build the manual with Meson 2024-10-09 11:58:17 -04:00