1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 11:43:15 +02:00
nix/src/libcmd
Sergei Zimmerman 11919bc471 {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-14 13:22:53 +00:00
..
.version Package libnixmain and libnixcmd with Meson 2024-07-05 16:40:55 -04:00
built-path.cc Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
built-path.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
command-installable-value.cc Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
command-installable-value.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
command.cc Formatting 2024-11-20 21:07:22 +01:00
command.hh Rename InputPath -> InputAttrPath 2025-01-23 16:34:35 +01:00
common-eval-args.cc Introduce EvalStore::storePath 2025-02-19 21:24:26 -05:00
common-eval-args.hh No global settings in libnixfetchers and libnixflake 2024-07-12 08:50:28 -04:00
compatibility-settings.hh Edit CompatibilitySettings 2024-07-11 13:59:49 +02:00
editor-for.cc Get rid of CanonPath::fromCwd 2024-02-08 11:01:41 -05:00
editor-for.hh Combine AbstractPos, PosAdapter, and Pos 2024-01-08 10:59:41 -08:00
installable-attr-path.cc Fix empty outputsToInstall for InstallableAttrPath 2024-06-02 14:26:18 +03:00
installable-attr-path.hh Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
installable-derived-path.cc Remove warning that interpretation of .drv has changed 2024-11-13 16:32:21 +01:00
installable-derived-path.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
installable-flake.cc language: cleanly ban integer overflows 2024-07-30 18:13:05 -07:00
installable-flake.hh fix(treewide): move arguments where needed 2024-11-08 20:10:38 +03:00
installable-value.cc fetchToStore(): Don't always respect settings.readOnlyMode 2024-02-20 11:46:49 +01:00
installable-value.hh fix(treewide): move arguments where needed 2024-11-08 20:10:38 +03:00
installables.cc Rename InputPath -> InputAttrPath 2025-01-23 16:34:35 +01:00
installables.hh nix copy: Add --out-link 2024-10-08 16:35:53 +02:00
legacy.cc Move command plugin interface to libnixcmd 2021-01-26 06:22:24 -05:00
legacy.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
markdown.cc libcmd: update to support lowdown-1.4 API 2024-12-29 21:49:27 +00:00
markdown.hh markdown.hh: Improve includes 2024-07-24 12:54:40 +02:00
meson.build packaging: use optimization level 3 and LTO by default 2025-01-01 21:59:37 -08:00
meson.options Package libnixmain and libnixcmd with Meson 2024-07-05 16:40:55 -04:00
misc-store-flags.cc Document Store Derivations and Deriving Paths (#12290) 2025-02-10 01:30:07 +00:00
misc-store-flags.hh nix hash path, and preperatory refactors 2024-02-21 12:11:25 -05:00
network-proxy.cc Fix format 2024-07-02 09:26:22 -04:00
network-proxy.hh Honor the same set of proxy environment variables (#10611) 2024-05-06 15:39:22 -04:00
nix-meson-build-support rename: build-utils-meson -> nix-meson-build-support 2024-12-09 16:54:42 +01:00
package.nix Write just ./.version on all components 2025-02-18 11:41:35 +01:00
repl-interacter.cc libcmd: do not compile editline helpers when building w/ readline 2024-07-28 11:40:16 +02:00
repl-interacter.hh refactor: repl prompts are now the job of the interacter 2024-03-12 18:25:35 -07:00
repl.cc {libexpr,libcmd}: Make debugger significantly faster 2025-03-14 13:22:53 +00:00
repl.hh Move NIX_BIN_DIR and all logic using it to the Nix executable itself 2024-08-12 12:29:17 -04:00