mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
OCD performance fix: {find,count}+insert => insert
This commit is contained in:
parent
e6e61f0a54
commit
99b73fb507
16 changed files with 32 additions and 65 deletions
|
@ -117,9 +117,7 @@ Path resolveSymlink(const Path & path)
|
|||
std::set<string> resolveTree(const Path & path, PathSet & deps)
|
||||
{
|
||||
std::set<string> results;
|
||||
if (deps.count(path))
|
||||
return {};
|
||||
deps.insert(path);
|
||||
if (!deps.insert(path).second) return {};
|
||||
for (auto & lib : runResolver(path)) {
|
||||
results.insert(lib);
|
||||
for (auto & p : resolveTree(lib, deps)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue