feat(VmTurnZone): Rework the implementation to minimize change detection runs

Before this PR there were only 2 zones: root zone = outer zone > inner
zone.
This PR creates the outer zone as a fork of the root zone: root > outer
> inner.

By doing this it is possible to detected microtasks scheduling in the
outer zone and run the change detection less often (no more than one
time per VM turn).

The PR also introduce a Promise monkey patch for the JS implementation.
It makes Promises aware of microtasks and again allow running the change
detection only once per turn.
This commit is contained in:
Victor Berchet
2015-04-10 12:42:33 +02:00
parent 358a6750ed
commit e8a6c95e2a
13 changed files with 2587 additions and 251 deletions

View File

@ -225,3 +225,5 @@ String elementText(n) {
return DOM.getText(n);
}
String getCurrentZoneName() => Zone.current['_name'];