facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Memoize getImmediateClasspaths to prevent NP problem #2687

Closed adolfojunior closed 2 years ago

adolfojunior commented 2 years ago

Summary: buck test gets stuck computing the action graph. The getImmediateClasspaths is expensive because it traverse the dependency tree recomputing every nested subtree.

Method will have a memoized supplier, to prevent nested computation.

Reviewed By: bobyangyf

facebook-github-bot commented 2 years ago

This pull request was exported from Phabricator. Differential Revision: D34586578