Bug 1545516 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Profile zoomed to the relevant track:
https://perfht.ml/2Un87Ha

(The blue bars there are largely ~300ms reflows)

In each case, the stack looks like this (I've removed some intervening levels for clarity):
```
 [newsblur JS]
   map   // probably operating on an array
     Node.removeChild
       nsDocShell::FirePageHideNotificationInternal
         [youtube JS]
           mozilla::dom::Window_Binding::get_innerWidth
             mozilla::dom::Document::FlushPendingNotifications
               Reflow http://www.newsblur.com/site/2022987/carryology-exploring-better-ways-to-carry
```

I think this may be a pathological "modifying DOM + flushing layout, in a loop" scenario...

The `map` call is probably iterating over a collection of nodes/objects, and it seems we're calling removeChild() on a bunch of youtube iframes perhaps, and each one of those youtube iframes has a pagehide listener (which gets invoked during the removeChild operation), which flushes layout.
Profile zoomed to the relevant track:
https://perfht.ml/2Un87Ha

(The blue bars there are largely ~300ms reflows)

In each case, the stack looks like this (I've removed some intervening levels for clarity):
```
 [newsblur JS]
   map   // probably operating on an array
     Node.removeChild
       nsDocShell::FirePageHideNotificationInternal
         [youtube JS]
           mozilla::dom::Window_Binding::get_innerWidth
             mozilla::dom::Document::FlushPendingNotifications
               Reflow http://www.newsblur.com/site/2022987/carryology-exploring-better-ways-to-carry
```

I think this may be a pathological "modifying DOM + flushing layout, in a loop" scenario...

The `map` call is probably iterating over a collection of nodes/objects, and it seems we're calling removeChild() on a bunch of youtube iframes perhaps, and each one of those youtube iframes has a pagehide listener (which gets invoked during the removeChild operation), which flushes layout (on the outer document, it seems).

Back to Bug 1545516 Comment 1