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

Unified Diff: pkg/barback/lib/src/transform_node.dart

Issue 36213002: Only run at most 10 transformers at once in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/barback/lib/src/transform_node.dart
diff --git a/pkg/barback/lib/src/transform_node.dart b/pkg/barback/lib/src/transform_node.dart
index 6df431540abf424db33bf94c2efa608a75a01b7e..0cfc508f1ed07fa2aa6d886d9beedb3bd482b335 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -125,7 +125,10 @@ class TransformNode {
_inputSubscriptions.clear();
_isDirty = false;
- return transformer.apply(transform).catchError((error) {
+
+ return phase.cascade.graph.transformerPool.checkOut().then((item) {
Alan Knight 2013/10/23 00:24:06 That seems like a rather awkward way to get to the
nweiz 2013/10/23 04:11:25 I agree. I'm planning a refactor that will make th
+ return transformer.apply(transform).whenComplete(item.release);
Alan Knight 2013/10/23 00:24:06 Is it worth defining a pool API that automatically
nweiz 2013/10/23 04:11:25 Done.
+ }).catchError((error) {
// If the transform became dirty while processing, ignore any errors from
// it.
if (_isDirty) return;

Powered by Google App Engine
This is Rietveld 408576698