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

Root zone should not wrap callbacks #92

Closed
btford opened this issue May 2, 2015 · 1 comment
Closed

Root zone should not wrap callbacks #92

btford opened this issue May 2, 2015 · 1 comment
Assignees

Comments

@btford
Copy link
Contributor

btford commented May 2, 2015

Currently the root zone wraps everything into callbacks and spawning new zones

The root zone should be inert, and not fork new zones. Only once you install some behavior via the first call to fork, then we should start wrapping calls into new zones.

Via @IgorMinar

@IgorMinar IgorMinar self-assigned this May 2, 2015
@IgorMinar
Copy link
Contributor

I have a PR for this

IgorMinar added a commit to IgorMinar/zone.js that referenced this issue May 2, 2015
It does not make sense for us to create new zones for callbacks from the root zone since we care
only about callbacks from installed custom zones. This reduces the overhead of zones.

Closes angular#92
IgorMinar added a commit to IgorMinar/zone.js that referenced this issue May 7, 2015
BREAKING CHANGE: New child zones are now created only from a async task that installed a custom zone.

Previously even without a custom zone installed (e.g. LongStacktracesZone), we would spawn new
child zones for all asynchronous events. This is undesirable and generally not useful.

It does not make sense for us to create new zones for callbacks from the root zone since we care
only about callbacks from installed custom zones. This reduces the overhead of zones.

This primarily means that LongStackTraces zone won't be able to trace events back to Zone.init(),
but instead the starting point will be the installation of the LongStacktracesZone. In all practical
situations this should be sufficient.

Closes angular#92
vicb pushed a commit to vicb/zone.js that referenced this issue May 7, 2015
BREAKING CHANGE: New child zones are now created only from a async task
that installed a custom zone.

Previously even without a custom zone installed (e.g.
LongStacktracesZone), we would spawn new
child zones for all asynchronous events. This is undesirable and
generally not useful.

It does not make sense for us to create new zones for callbacks from the
root zone since we care
only about callbacks from installed custom zones. This reduces the
overhead of zones.

This primarily means that LongStackTraces zone won't be able to trace
events back to Zone.init(),
but instead the starting point will be the installation of the
LongStacktracesZone. In all practical
situations this should be sufficient.

Closes angular#92
vicb pushed a commit to vicb/zone.js that referenced this issue May 7, 2015
BREAKING CHANGE: New child zones are now created only from a async task
that installed a custom zone.

Previously even without a custom zone installed (e.g.
LongStacktracesZone), we would spawn new
child zones for all asynchronous events. This is undesirable and
generally not useful.

It does not make sense for us to create new zones for callbacks from the
root zone since we care
only about callbacks from installed custom zones. This reduces the
overhead of zones.

This primarily means that LongStackTraces zone won't be able to trace
events back to Zone.init(),
but instead the starting point will be the installation of the
LongStacktracesZone. In all practical
situations this should be sufficient.

Closes angular#92
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants