1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00
nix/src/libexpr
Sergei Zimmerman adbd08399c {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
```
2025-03-13 16:24:30 +00:00
..
primops Merge remote-tracking branch 'upstream/master' into lfs 2025-02-03 19:07:20 +01:00
value Fix most DoxyGen warnings 2024-11-12 15:34:24 +01:00
.version Meson build for libexpr and libflake 2024-07-02 09:23:24 -04:00
attr-path.cc chore: get rid of dead code and unused variables where appropriate 2024-11-22 18:05:53 +03:00
attr-path.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
attr-set.cc Never update values after setting the type 2024-03-25 19:21:25 +01:00
attr-set.hh Remove comparator.hh and switch to <=> in a bunch of places 2024-07-12 14:54:18 -04:00
call-flake.nix Format .nix files 2025-01-24 17:04:02 +01:00
eval-cache.cc Split ignoreException for destructors or interrupt-safe 2024-09-30 11:50:25 +02:00
eval-cache.hh Fix warning 2024-06-10 12:46:04 +02:00
eval-error.cc {libexpr,libcmd}: Make debugger significantly faster 2025-03-13 16:24:30 +00:00
eval-error.hh Merge pull request #11043 from hercules-ci/assert-eq 2024-07-22 17:34:28 +02:00
eval-gc.cc Merge remote-tracking branch 'origin/master' into flip-coroutines 2024-08-20 17:19:17 +02:00
eval-gc.hh Merge pull request #11619 from NaN-git/fix-disable-gc 2024-10-01 14:55:22 +02:00
eval-inline.hh fix(libexpr/eval-inline): get rid of references to nullptr env 2024-11-20 17:54:58 +03:00
eval-settings.cc getDefaultNixPath(): Don't add symlinks if the target doesn't exist 2025-02-17 11:36:47 +01:00
eval-settings.hh Fix a few warnings 2025-02-17 19:29:01 +01:00
eval.cc {libexpr,libcmd}: Make debugger significantly faster 2025-03-13 16:24:30 +00:00
eval.hh {libexpr,libcmd}: Make debugger significantly faster 2025-03-13 16:24:30 +00:00
fetchurl.nix Format .nix files 2025-01-24 17:04:02 +01:00
function-trace.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
function-trace.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
gc-small-vector.hh Alias traceable_allocator to std::allocator when building without GC 2024-09-19 21:04:01 +02:00
get-drvs.cc cleanup: remove superfluous std::string copies 2024-10-06 13:43:29 +02:00
get-drvs.hh Alias traceable_allocator to std::allocator when building without GC 2024-09-19 21:04:01 +02:00
imported-drv-to-derivation.nix Format .nix files 2025-01-24 17:04:02 +01:00
json-to-value.cc fromJSON/fromTOML: throw if string contains null byte 2024-12-09 22:04:21 +01:00
json-to-value.hh libexpr: Support structured error classes 2024-02-01 16:39:38 -08:00
lexer-helpers.cc libexpr: Rename "column" fields to offset 2024-07-15 19:56:40 +02:00
lexer-helpers.hh libutil/windows: only define headers/code if we are actually on windows 2024-12-17 22:00:34 +01:00
lexer.l correctly parse strings with null bytes and throw error 2025-01-04 16:14:06 +01:00
meson.build {libutil,libexpr}: Move pos-idx,pos-table code to libutil 2025-03-13 13:29:08 +00:00
meson.options Meson build for libexpr and libflake 2024-07-02 09:23:24 -04:00
nix-meson-build-support rename: build-utils-meson -> nix-meson-build-support 2024-12-09 16:54:42 +01:00
nixexpr.cc {libutil,libexpr}: Move pos-idx,pos-table code to libutil 2025-03-13 13:29:08 +00:00
nixexpr.hh libexpr: Fix use-after-free of StaticEnv::up 2025-02-21 14:36:39 +00:00
package.nix Write just ./.version on all components 2025-02-18 11:41:35 +01:00
parser-state.hh parser-state: fix attribute merging 2024-11-27 21:41:47 +01:00
parser.y Parser: Respect the accessor of the source file for relative paths 2025-02-06 16:33:43 +01:00
paths.cc Introduce EvalStore::storePath 2025-02-19 21:24:26 -05:00
primops.cc Merge pull request #12442 from NixOS/store-derivation-options 2025-03-03 23:11:51 +01:00
primops.hh use byte indexed locations for PosIdx 2024-03-06 23:48:42 +01:00
print-ambiguous.cc Make abort() call sites log first 2024-07-24 16:52:04 +02:00
print-ambiguous.hh Restore ambiguous value printer for nix-instantiate 2024-01-11 16:34:36 -08:00
print-options.hh fix missing includes in various headers 2024-12-17 22:00:34 +01:00
print.cc MacOS built: add workaround for missing view() member of std::ostringstream 2024-10-07 02:05:53 +02:00
print.hh Rename hintfmt to HintFmt 2024-02-08 11:58:25 -08:00
repl-exit-status.hh :quit in the debugger should quit the whole program 2024-02-20 10:01:13 -08:00
search-path.cc Rename SearchPath to LookupPath and searchPath to lookupPath 2024-04-13 17:35:15 +02:00
search-path.hh Build a minimized Nix with MinGW 2024-04-17 12:26:10 -04:00
symbol-table.hh Merge pull request #11191 from DeterminateSystems/hash-symbol 2024-07-29 15:30:37 +02:00
value-to-json.cc toJSON: re-throw serialization exception 2024-12-31 20:33:28 +01:00
value-to-json.hh toJSON: re-throw serialization exception 2024-12-31 20:33:28 +01:00
value-to-xml.cc SymbolStr: Remove std::string conversion 2024-07-11 17:43:10 +02:00
value-to-xml.hh Use std::set<StringContextElem> not PathSet for string contexts 2023-04-21 01:05:49 -04:00
value.hh correctly parse strings with null bytes and throw error 2025-01-04 16:14:06 +01:00