mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
Cache parse trees
This prevents EvalState::resetFileCache() from parsing everything all over again.
This commit is contained in:
parent
6ad0a2f749
commit
24c6806994
2 changed files with 19 additions and 2 deletions
|
@ -90,6 +90,14 @@ public:
|
|||
private:
|
||||
SrcToStore srcToStore;
|
||||
|
||||
/* A cache from path names to parse trees. */
|
||||
#if HAVE_BOEHMGC
|
||||
typedef std::map<Path, Expr *, std::less<Path>, traceable_allocator<std::pair<const Path, Expr *> > > FileParseCache;
|
||||
#else
|
||||
typedef std::map<Path, Expr *> FileParseCache;
|
||||
#endif
|
||||
FileParseCache fileParseCache;
|
||||
|
||||
/* A cache from path names to values. */
|
||||
#if HAVE_BOEHMGC
|
||||
typedef std::map<Path, Value, std::less<Path>, traceable_allocator<std::pair<const Path, Value> > > FileEvalCache;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue