-
Notifications
You must be signed in to change notification settings - Fork 408
WTF_ISSUE_555 loop garbage collection / unfunctional #1244
Comments
well, that typo creates twice the amount of memory garbage (12 MB) then an entire vue.js app I wrote. |
We will fix this one ASAP, thanks for the waiting. |
And if you are targeting only the |
The documentation is false regarding loading
It's exactly the other way around. |
This should be fixed by angular/angular#31208 |
Profiling our page and improving perf I stumbled over zone.js that creates a hefty amount of GC pressure and CPU time.
In particular this method

eventTargetLegacyPatch
:That red bar inside that function is 50% of the load time of zone.js.
Looking in a debugger ... what is that even supposed to do? :D
So it takes the length of the string
WTF_ISSUE_555
, that is a loop of 425 iterations (because the string is 425 characters long) but then uses the index on the arrayWTF_ISSUE_555_ARRAY
that only has 64 elements. And it has an inner loop with 218 elements, so that doubleloop creates 92625 strings and writes/overwrites them into the target object. And that then hold items likeabort: "undefined.addEventListener:abort
.This can't be right, is it? :)
Seems like that loop was introduced in b3a76d3
zone.js version 0.9.1, inside zone.js/dist/zone.js line 2766 to 2773
The text was updated successfully, but these errors were encountered: