cc: Make TaskGraphRunner DependencyMismatch debug check faster.
When a new dependency graph is scheduled, TaskGraphRunner checks
that the number of dependencies explicitly set in the nodes matches
the dependencies defined by the edges of the graph.
While the performance of this check is not a real issue, since it
runs only in debug and usually the number of nodes/edges is small,
it can be a problem in tests where the number of nodes is artifically
high.
This CL makes the debug check faster changing the runtime complexity
of the code from O(|nodes| X |edges|) to O(max(|nodes|, |edges|).
BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/
1263223004
Cr-Commit-Position: refs/heads/master@{#341825}