Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory regression in RuleVisibility
Benchmarks show that bazelbuild@cd82f68 introduced a memory regression. Fix it by: * memoizing the very frequently used ["//visibility:public"] and ["//visibility:private"] declared labels lists * for filtering out private labels, using a list builder with a known expected size instead of relying on the streams api I also experimented with feeding the simplified visibility label lists back into the package builder's list interner - but decided against it because benchmarks show it results in a slightly higher memory usage. PiperOrigin-RevId: 681511741 Change-Id: I498e4adca976834d6b137b106f9d202c793bb54d
- Loading branch information