Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Issue 2037303002: Improve the "gn path" command. (Closed)

Created:
4 years, 6 months ago by brettw
Modified:
4 years, 6 months ago
Reviewers:
Dirk Pranke
CC:
chromium-reviews, Dirk Pranke, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve the "gn path" command. Previously, GN path would find all paths between the two targets, count them for statistical purposes, sort them, and print the shortest (or all of them if requested). Unfortunately, there are many hundred millions of unique paths between two targets like //chrome and //base and it would take a long time and eventually run out of address space counting them all. This patch changes the algorithm from depth-first to breadth-first search, and doesn't traverse or count a target if that target was already found to have a path to the destination. The result is the path from //chrome to //base finds 65 paths which makes the algorithm run instantly and the output with --all is much more useful. Committed: https://crrev.com/8161ecd407152b4a07652b62dad8b2b273a55638 Cr-Commit-Position: refs/heads/master@{#398491}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : include #

Total comments: 1

Patch Set 4 : comment fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -149 lines) Patch
M tools/gn/command_path.cc View 1 2 3 6 chunks +244 lines, -149 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
brettw
include
4 years, 6 months ago (2016-06-05 18:31:07 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037303002/40001
4 years, 6 months ago (2016-06-05 18:31:17 UTC) #3
brettw
4 years, 6 months ago (2016-06-05 18:31:32 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-05 19:26:02 UTC) #8
Dirk Pranke
Sorry, I didn't have time to get to this today; I should be able to ...
4 years, 6 months ago (2016-06-07 02:01:28 UTC) #9
brettw
No rush, this is obviously not blocking anything.
4 years, 6 months ago (2016-06-07 03:57:17 UTC) #10
Dirk Pranke
lgtm https://codereview.chromium.org/2037303002/diff/40001/tools/gn/command_path.cc File tools/gn/command_path.cc (right): https://codereview.chromium.org/2037303002/diff/40001/tools/gn/command_path.cc#newcode202 tools/gn/command_path.cc:202: // doing depth-first search, we know that the ...
4 years, 6 months ago (2016-06-07 22:55:37 UTC) #11
brettw
comment fix
4 years, 6 months ago (2016-06-08 05:11:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037303002/60001
4 years, 6 months ago (2016-06-08 05:11:41 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-08 06:12:27 UTC) #17
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 06:14:01 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8161ecd407152b4a07652b62dad8b2b273a55638
Cr-Commit-Position: refs/heads/master@{#398491}

Powered by Google App Engine
This is Rietveld 408576698