diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-30 11:49:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-30 11:49:56 +0200 |
commit | 59f70280dee90957a672810a3845af2dec8552e8 (patch) | |
tree | 609b729c394b44a38418a6f19d03893dbfbd0e9f /libbuild2/target.cxx | |
parent | 3bbbe09e8629ab5311a1bcbb9f56aa6a33e36f55 (diff) |
Reserve targets, variables to avoid rehashing
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r-- | libbuild2/target.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index 9f26eee..76d45c7 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -760,6 +760,18 @@ namespace build2 if (p.second) { +#if 0 + { + size_t n (map_.bucket_count ()); + if (n > buckets_) + { + text << "target_set buckets: " << buckets_ << " -> " << n + << " (" << map_.size () << ")"; + buckets_ = n; + } + } +#endif + t->ext_ = &i->first.ext; t->decl = decl; t->state.inner.target_ = t; |