3 ms·
Can anyone explain specifically what the YT code does that the existing python interpreter is unusable and apparently quickjs takes 20 minutes to run it? Is it
by progbits 1y ago
Can anyone explain specifically what the YT code does that the existing python interpreter is unusable and apparently quickjs takes 20 minutes to run it?
Is it just a lot of CPU-bound code and the modern JIT runtimes are simply that much faster, or is it doing some trickery that deno optimizes well?
- progbits 1y agoFrom https://github.com/ytdl-org/youtube-dl/issues/33186 https://github.com/ytdl-org/youtube-dl/issues/33186 > Currently, a new style of player JS is beginning to be sent where the challenge code is no longer modular but is hooked into other code throughout the player JS. So it's no longer a standalone script that can be interpreted but it depends on all the other code on the site? Which could still be interpreted maybe but is a lot more complex and might need DOM etc? Just guessing here, if anyone knows the details would love to hear more.
- zenmac 1y agoYeah that is guess google using spaghetti code to keep their yt moat.
- Chris2048 1y agoCould something like tree-shaking be used to reduce the player code to just the token generating bit? Or does the whole player js change for each video?
- zelphirkalt 1y agoSounds like a really silly way to engineer things, but then again Google has the workforce to do lots of silly things and the cash to burn, so they can afford it.
- Klonoar 1y agoIt's silly from an engineering perspective, but unfortunately clever from YT's perspective of "how do we complicate this as much as possible".
- ACCount37 1y agoYouTube is mining cry- I mean, running some unknown highly obfuscated CPU-demanding JS code on your machine - and using its results to decide whether to permit or deny video downloads. The enshittification will continue until user morale improves.
- johnisgood 1y agoAnd at the same time we are against websites mining crypto. At this point they could do that, too...