@nikitonsky also, if I'm being a pedant, your statement is false :)
while (true){} takes infinitely more time to execute than veryveryverylongname=1, for example
Top-level
@nikitonsky also, if I'm being a pedant, your statement is false :) while (true){} takes infinitely more time to execute than veryveryverylongname=1, for example 7 comments
@iliazeus I can see the time it takes to initialize code _every time you scroll past it_ with my naked eye. That’s definitely a sign of a computer doing crazy amount of work @nikitonsky that's a completely different website Again, I was talking specifically about YouTube embeds, and how simply changing them all to <video> elements might not reduce the computer's work by that much, while introducing other complications and edge cases along the way. @iliazeus Yes, that’s the one from the post about JS bloat Anyways, if Google can’t reduce their embed down from 3 MB (while other people can) and also recommend to use 3rd-party embeds, I don’t trust them no to waste CPU, too @nikitonsky can you please at least add links to YouTube videos? As I wrote in a neighboring thread, the <video>s are way too big to comfortably watch on a phone, or with a less-than-ideal connection. And hard to skim through to find a part I'm interested in, because of lack of chapters or a transcript. (as it turns out, _some_ of the things a YouTube embed does are actually useful, after all :) @nikitonsky thank you Sorry if my comments came of as too aggressive btw, I didn't mean that. Still having some difficulty expressing my thoughts correctly, especially in English. |
@nikitonsky this exaggerated example might be surprisingly relevant, since the code might just detect it's being loaded more than once, and skip all the initialization steps on subsequent runs. Embedding several videos into a single page is a common use case, after all.
But I've not tested that, so I can't say for sure.