Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
perf(scope): optim createChild() which always append at the end
Browse files Browse the repository at this point in the history
Closes #626
  • Loading branch information
vicb authored and mhevery committed Feb 26, 2014
1 parent 107e80d commit 78f0c82
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/core/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,11 @@ class Scope {
var child = new Scope(childContext, rootScope, this,
_readWriteGroup.newGroup(childContext),
_readOnlyGroup.newGroup(childContext));
var next = null;

var prev = _childTail;
child._next = next;
child._prev = prev;
if (prev == null) _childHead = child; else prev._next = child;
if (next == null) _childTail = child; else next._prev = child;
_childTail = child;
return child;
}

Expand Down Expand Up @@ -419,7 +418,7 @@ class RootScope extends Scope {

RootScope(Object context, this._astParser, this._parser,
GetterCache cacheGetter, FilterMap filterMap,
this._exceptionHandler, this._ttl, this._zone,
this._exceptionHandler, this._ttl, this._zone,
this._scopeStats)
: super(context, null, null,
new RootWatchGroup(new DirtyCheckingChangeDetector(cacheGetter), context),
Expand Down

0 comments on commit 78f0c82

Please sign in to comment.