[engine] Simplify ProductGraph.walk
Review Request #3792 — Created April 30, 2016 and submitted
|gmalmquist, kwlzn, patricklaw, peiyu|
ProductGraph.walkfirst came into existence in order to visualize the product graph, and the result was biased toward dumping an adjacency list. The vast majority of consumers don't need to dump an adjacency list, and if they do need to they can do the adjacencies lookups themselves without much additional effort.
This makes walks (particularly the one used to populate the BuildGraph from its cached representation) about 90% faster, and avoids a bunch of unused filtered dependencies lists.
- Drop the dependencies list from ProductGraph.walk
- Switch to a two-arg predicate in order to skip creating an entry tuple for entries which we won't yield
- Fix up tests