Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[engine] Improving performance by iteratively hydrate build file addr…
…esses within SelectTransitive (pantsbuild#4349) ### Problem As described in pantsbuild#4283, the issue with recursively executing `SelectTransitive` is lots of calls to `store_list` creating massive intermediate lists that increases memory footprint as well as impacts perf. ### Solution Same idea as in pantsbuild#4265 using `loop_fn` rewrite `SelectTransitive` to execute iteratively. One small difference is in order to use `OrderMap` and `HashSet` for state tracking and outputs are in `Value`s, those `Values` are turned into `Key`s. ps: previous PR pantsbuild#4334 paved way for this optimization by splitting `SelectTransitive` from `SelectDependencies(...transitive=true)`. ### Result All existing tests pass. Have verified there is only one `ST` node through viz. Two follow up items * pantsbuild#4358 reenable cycle detection * pantsbuild#3925 Remove BFA now not only is a clean up task, but has performance benefits because the second round hydration is on `Address` which is redundant.
- Loading branch information