cc: Make TaskGraphRunner DependencyMismatch debug check faster.
commitde791ab8def0ddc494527fcdda652399b8c6e50c
authordcastagna <dcastagna@chromium.org>
Tue, 4 Aug 2015 23:34:17 +0000 (4 16:34 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 4 Aug 2015 23:38:33 +0000 (4 23:38 +0000)
tree33ca90c26c05abb60ed2c53396a23b4a9f3b00c0
parent648e7a183ed03b90487fe1d0d36fa6c722ca035c
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}
cc/raster/task_graph_runner.cc