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

Issue 26537002: Add a UniqueVector class to GN (Closed)

Created:
7 years, 2 months ago by brettw
Modified:
6 years, 4 months ago
Reviewers:
viettrungluu
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

This is an ordered set tailored to GN's (simple) needs. This vector is now used to store all config lists. Previously the code did a bunch of work to uniquify configs at certain points (in target.cc) but direct_dependent_configs still ended up with lots of duplicates. Before this patch the chrome/browser target has 41098 direct_dependent_configs, and after this patch it has 7. Apparently we were also spending a lot of time on these. Before this patch Windows wall clock time was 1031ms, and after this patch it's 831ms. Linux was 834ms before and 593ms after. Also fix minor build issues in base I noticed while working on this. R=viettrungluu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287865

Patch Set 1 #

Patch Set 2 : comments #

Total comments: 2

Patch Set 3 : GCC #

Patch Set 4 : git try #

Patch Set 5 : #

Patch Set 6 : git try #

Patch Set 7 : merge #

Patch Set 8 : #

Patch Set 9 : Remove unneeded stuff #

Patch Set 10 : Clang fixes #

Patch Set 11 : Template* hash specialization for clang #

Patch Set 12 : clang try #2 #

Patch Set 13 : #

Patch Set 14 : clang npos #

Total comments: 8

Patch Set 15 : #

Patch Set 16 : REview comments, remove npos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+570 lines, -175 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M base/debug/stack_trace_win.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M tools/gn/builder.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -1 line 0 comments Download
M tools/gn/builder.cc View 1 2 3 4 5 6 7 4 chunks +23 lines, -6 lines 0 comments Download
M tools/gn/command_desc.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +20 lines, -1 line 0 comments Download
M tools/gn/gn.gyp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M tools/gn/header_checker.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M tools/gn/label.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M tools/gn/label_ptr.h View 1 2 3 4 5 6 7 2 chunks +37 lines, -0 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -7 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.cc View 1 2 3 4 5 6 7 7 chunks +20 lines, -23 lines 0 comments Download
M tools/gn/ninja_binary_target_writer_unittest.cc View 1 2 3 4 5 6 7 6 chunks +6 lines, -15 lines 0 comments Download
M tools/gn/output_file.h View 1 2 3 4 5 6 7 2 chunks +22 lines, -0 lines 0 comments Download
M tools/gn/source_dir.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -0 lines 0 comments Download
M tools/gn/source_file.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -0 lines 0 comments Download
M tools/gn/target.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +32 lines, -15 lines 0 comments Download
M tools/gn/target.cc View 1 2 3 4 5 6 7 6 chunks +25 lines, -57 lines 0 comments Download
M tools/gn/target_generator.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/target_generator.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -6 lines 0 comments Download
M tools/gn/target_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +7 lines, -7 lines 0 comments Download
A tools/gn/unique_vector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +189 lines, -0 lines 0 comments Download
A tools/gn/unique_vector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +43 lines, -0 lines 0 comments Download
M tools/gn/value_extractors.h View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -23 lines 0 comments Download
M tools/gn/value_extractors.cc View 1 2 3 4 5 6 7 3 chunks +66 lines, -10 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
brettw
7 years, 2 months ago (2013-10-08 18:03:54 UTC) #1
viettrungluu
lgtm https://codereview.chromium.org/26537002/diff/3001/tools/gn/uniquify.h File tools/gn/uniquify.h (right): https://codereview.chromium.org/26537002/diff/3001/tools/gn/uniquify.h#newcode77 tools/gn/uniquify.h:77: std::swap(cur, (*container)[dest_i]); Having to do a swap is ...
7 years, 2 months ago (2013-10-08 23:39:41 UTC) #2
brettw
PTAL. This removes the Uniquify algorithm and replaces it with a UniqueVector container that works ...
6 years, 4 months ago (2014-08-01 23:08:50 UTC) #3
viettrungluu
https://codereview.chromium.org/26537002/diff/235001/tools/gn/unique_vector.h File tools/gn/unique_vector.h (right): https://codereview.chromium.org/26537002/diff/235001/tools/gn/unique_vector.h#newcode14 tools/gn/unique_vector.h:14: // This struct allows us to insert things by ...
6 years, 4 months ago (2014-08-06 19:43:52 UTC) #4
brettw
https://codereview.chromium.org/26537002/diff/235001/tools/gn/unique_vector.h File tools/gn/unique_vector.h (right): https://codereview.chromium.org/26537002/diff/235001/tools/gn/unique_vector.h#newcode39 tools/gn/unique_vector.h:39: UniquifyRef(const std::vector<T>* v, size_t i) On 2014/08/06 19:43:52, viettrungluu ...
6 years, 4 months ago (2014-08-06 20:13:03 UTC) #5
viettrungluu
Do you use UniquifyRef outside of the implementation of UniqueVector? If not, maybe you should ...
6 years, 4 months ago (2014-08-06 20:26:16 UTC) #6
brettw
On 2014/08/06 20:26:16, viettrungluu wrote: > Do you use UniquifyRef outside of the implementation of ...
6 years, 4 months ago (2014-08-06 20:35:08 UTC) #7
viettrungluu
lgtm
6 years, 4 months ago (2014-08-06 21:42:49 UTC) #8
brettw
6 years, 4 months ago (2014-08-06 21:44:39 UTC) #9
Message was sent while issue was closed.
Committed patchset #16 manually as 287865 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698