← Back to context

Comment by magicalist

6 years ago

> You need heuristics of some kind to get good performance, and I can't blame Microsoft for using the DOM for that.

which, again, that's fine, but mayyyyybe they were a little lax in checking performance on nearly any other popular video site on the web to see if that heuristic is a good one?

Or maybe changing page layout in an extremely common way wasn't an effort to undermine a hyper specific benchmark?

How many sites put invisible DOM elements over the videos?

Remember, if you put visible DOM elements on top of the videos, then you lose scanout compositing no matter what.

  • > How many sites put invisible DOM elements over the videos?

    A lot of them? Vimeo, for instance, has a number of opacity: 0 and hidden divs over the video. Twitch has at least a couple of opacity: 0 divs on top.

    Maybe we're interpreting the phrase

    > hidden empty div over YouTube videos

    differently? That's the structure I assume they were talking about.

    • I'd assume that it was actually an invisible, but not technically hidden div, leading to a fully transparent blending pass - divs with opacity:0 or display:none are trivial to optimize for this case.

      1 reply →

  • There are visible elements on top of YouTube videos.

    That's what this "empty div" is for if that's the one I think it is. It is the container for things like branding and annotations.