What are zonal turns?

The following error appeared in angular2 application.

 WARNING: your application is taking longer than 2000 Zone turns.

My question is: what are “zone turns”, why does he warn me when he is above 2000? (I know I can change the limit, but then why should I do this?)

+2
source share
1 answer

This error occurs using Angular2 / Universal. When the zone microtask queue is processed and after processing 2000 tasks, tasks are still waiting from the queue. This can be caused by a lot of asynchronous work, which itself runs many async tasks. Angular expects the queue to become empty.

https://github.com/angular/universal/issues/377#issuecomment-215229702

you can set maxZoneTurns to 10000 if you want or higher

, https://github.com/angular/universal/blob/9508ac03650ca0439192b8ed49ce8f1e57b6be33/modules/universal/src/node/bootloader.ts#L158

+3

Source: https://habr.com/ru/post/1650273/


All Articles