Joe Maring / Android Authority
TL;DR YouTube’s web player apparently has a rendering bug that sends browsers into an infinite loop of visual changes.
The constant page rendering loop is causing processor and RAM usage to skyrocket, with users reporting memory consumption in the gigabytes.
Users with browsers suffering from the bug are noticing extreme lag, stuttering, and frame drops during video playback.
YouTube users are reporting issues with the platform’s web player, with the site causing unexplained browser lag and extreme memory usage. The stutters, frame drops, and RAM consumption are affecting users of multiple browsers, including Firefox and Brave, according to posts (1, 2) on Reddit.
The culprit appears to be a rendering bug in YouTube code that sends browsers into an infinite loop, per savvy developers on a Mozilla Bugzilla thread (via PiunikaWeb). Essentially, the code issue makes browsers render and resize visual elements of YouTube’s web player in endless and rapid fashion, overwhelming the computer’s processors and memory.
The developers on Mozilla’s forum say that the “ytd-menu-renderer” tag, which houses the like, dislike, and share buttons, is causing the visual bugs. This is a flexible menu that dynamically shows and hides buttons based on the available screen width. The developers explain that “ytd-menu-renderer” works by removing one button automatically if they are overflowing on the screen, and putting the buttons back when the menu element widens. The code is intended to ensure only the buttons that fit on your screen comfortably are shown.
However, the developer comments point out that “hostElement.clientWidth” grows when “ytd-menu-renderer” automatically hides a button. This causes YouTube’s code to think the menu area is wide enough to fit the button, so it adds the button back. Of course, since there isn’t actually enough visual space, “ytd-menu-renderer” removes the button again. The menu container expands once again, and you probably get the idea. It’s a never-ending cycle that forces your browser and PC to keep calculating, resizing, and rendering YouTube’s flexible menu.
Don’t want to miss the best from Android Authority? Set us as a favorite source in Google Discover to never miss our latest exclusive reports, expert analysis, and much more.
to never miss our latest exclusive reports, expert analysis, and much more. You can also set us as a preferred source in Google Search by clicking the button below.
... continue reading