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

Issue 331263002: Improve parallelism when loading transformer plugins. (Closed)

Created:
6 years, 6 months ago by nweiz
Modified:
6 years, 6 months ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Improve parallelism when loading transformer plugins. Rather than only looking at the package-level dependency graph, pub will now examine transformer files' imports to determine dependencies between transformers. This improves both load times and cycle detection. For example, a package using polymer transformers can now load them in two phases rather than four, reducing the load time by about half. In addition, this gives transformer authors more control over how parallel their transformer graph is. With some $include/$exclude and import tweaks, most remaining transformer dependencies can be eliminated. R=rnystrom@google.com Committed: https://code.google.com/p/dart/source/detail?r=37461

Patch Set 1 #

Total comments: 64

Patch Set 2 : code review #

Total comments: 4

Patch Set 3 : code review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1781 lines, -437 lines) Patch
M sdk/lib/_internal/pub/lib/src/barback.dart View 1 6 chunks +26 lines, -9 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart View 1 chunk +0 lines, -1 line 0 comments Download
A sdk/lib/_internal/pub/lib/src/barback/cycle_exception.dart View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart View 1 2 6 chunks +76 lines, -158 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/barback/rewrite_import_transformer.dart View 3 chunks +5 lines, -12 lines 0 comments Download
A sdk/lib/_internal/pub/lib/src/barback/transformers_needed_by_transformers.dart View 1 2 1 chunk +389 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/dart.dart View 1 chunk +16 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/package_graph.dart View 1 chunk +0 lines, -18 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/utils.dart View 1 2 2 chunks +3 lines, -64 lines 0 comments Download
M sdk/lib/_internal/pub/test/test_pub.dart View 3 chunks +6 lines, -5 lines 0 comments Download
D sdk/lib/_internal/pub/test/transformer/detects_a_transformer_cycle_test.dart View 1 chunk +0 lines, -48 lines 0 comments Download
D sdk/lib/_internal/pub/test/transformer/detects_an_ordering_dependency_cycle_test.dart View 1 chunk +0 lines, -66 lines 0 comments Download
D sdk/lib/_internal/pub/test/transformer/loads_ordering_dependencies_in_the_correct_order_test.dart View 1 chunk +0 lines, -56 lines 0 comments Download
A sdk/lib/_internal/pub/test/transformers_needed_by_transformers/conservative_dependencies_test.dart View 1 2 1 chunk +466 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/transformers_needed_by_transformers/cycle_test.dart View 1 chunk +212 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/transformers_needed_by_transformers/error_test.dart View 1 2 1 chunk +49 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/transformers_needed_by_transformers/import_dependencies_test.dart View 1 chunk +195 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/transformers_needed_by_transformers/no_dependencies_test.dart View 1 chunk +161 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/transformers_needed_by_transformers/utils.dart View 1 1 chunk +112 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
nweiz
6 years, 6 months ago (2014-06-16 19:55:57 UTC) #1
nweiz
Unlike the previous iteration of the transformer-ordering code, I decided to go with longer, more ...
6 years, 6 months ago (2014-06-16 19:56:44 UTC) #2
Bob Nystrom
https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart File sdk/lib/_internal/pub/lib/src/barback.dart (right): https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart#newcode205 sdk/lib/_internal/pub/lib/src/barback.dart:205: /// If `path` is null, this will determine which ...
6 years, 6 months ago (2014-06-17 19:59:25 UTC) #3
Bob Nystrom
What kind of load time improvement do you see with this change?
6 years, 6 months ago (2014-06-17 20:00:06 UTC) #4
nweiz
https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart File sdk/lib/_internal/pub/lib/src/barback.dart (right): https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart#newcode205 sdk/lib/_internal/pub/lib/src/barback.dart:205: /// If `path` is null, this will determine which ...
6 years, 6 months ago (2014-06-17 23:38:52 UTC) #5
Bob Nystrom
Couple more suggestions then LGTM. https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart File sdk/lib/_internal/pub/lib/src/barback.dart (right): https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback.dart#newcode210 sdk/lib/_internal/pub/lib/src/barback.dart:210: if (fileExists(transformerPath)) return transformerPath; ...
6 years, 6 months ago (2014-06-18 18:24:48 UTC) #6
nweiz
https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback/cycle_exception.dart File sdk/lib/_internal/pub/lib/src/barback/cycle_exception.dart (right): https://codereview.chromium.org/331263002/diff/1/sdk/lib/_internal/pub/lib/src/barback/cycle_exception.dart#newcode44 sdk/lib/_internal/pub/lib/src/barback/cycle_exception.dart:44: return steps.toList(); On 2014/06/18 18:24:48, Bob Nystrom wrote: > ...
6 years, 6 months ago (2014-06-18 20:05:33 UTC) #7
nweiz
6 years, 6 months ago (2014-06-18 20:07:50 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 manually as r37461 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698