mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
Deduplicate filenames in Pos
This saves ~4 MiB of RAM for NixOS system instantiation, and ~18 MiB for "nix-env -qa".
This commit is contained in:
parent
b1e3b1a4ac
commit
9deb822180
3 changed files with 7 additions and 6 deletions
|
@ -29,7 +29,7 @@ namespace nix {
|
|||
SymbolTable & symbols;
|
||||
Expr * result;
|
||||
Path basePath;
|
||||
Path path;
|
||||
Symbol path;
|
||||
string error;
|
||||
Symbol sLetBody;
|
||||
ParseData(EvalState & state)
|
||||
|
@ -486,7 +486,7 @@ Expr * EvalState::parse(const char * text,
|
|||
yyscan_t scanner;
|
||||
ParseData data(*this);
|
||||
data.basePath = basePath;
|
||||
data.path = path;
|
||||
data.path = data.symbols.create(path);
|
||||
|
||||
yylex_init(&scanner);
|
||||
yy_scan_string(text, scanner);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue