[engine] Simplify ProductGraph.walk

Review Request #3792 - Created April 30, 2016 and submitted

Stu Hood
gmalmquist, kwlzn, patricklaw, peiyu

ProductGraph.walk first 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


Kris Wilson
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 5f29e07487fc5500cbdda86dd9def63db9d91d5d