On pages that abuse embedded youtube Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
VozFreeAccounts
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2022-05-17, 16:58

On pages that abuse embedded youtube

Unread post by VozFreeAccounts » 2022-05-17, 19:23

Pale Moon 31.0 64 bit on Windows 10. 4GB of RAM. Example page: https://voz.vn/u/hoang-da-rung-nui.1806091/

Without using NoScript, the page took very long time to load and during that the browser is very laggy and unresponsive. But if you use NoScript, you ruined other functionalities of the page, too. I want to find a way to tweak Pale Moon performance or block only embedded youtube from loading. Please help.

p/s: If it's an adblock rule I could put into UbO's filter it's very good.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: On pages that abuse embedded youtube

Unread post by andyprough » 2022-05-17, 19:50

The ηMatrix addon will give you the fine level of control you are looking for: https://addons.palemoon.org/addon/ematrix/

User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-17, 18:02



User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-18, 15:37

back2themoon wrote:
2022-06-17, 19:16
Try this, it might improve YouTube overall:

viewtopic.php?f=65&t=28486&p=229327&hilit=vp9#p229309
Doesn't have any effects my friend. BTW, this thread is about embedded youtube so it's more about abusing of JavaScript (since youtube embedded themselves are scripts) causing the page to take too much time to load. The solution is NoScript or using UbO to block youtube embedded like my answer above.

User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-18, 15:42

nguyen9173 wrote:
2022-06-17, 18:02
This is what you are seeking for :mrgreen:

https://www.ghacks.net/2021/04/02/make- ... ck-origin/
The side effect of this is it's also break youtube embedded on invidious instances. The solution is you only enable these filters when you want to visit the page that overly abused youtube embedded like your example site. After you are done with that site you have to disable them for youtube embedded to work again. You could do so by turning them into comments by adding "!" in the beginning of each line of them. To enable them again you just have to remove the "!". A bit annoying but it's work as expected.

Goodydino
Keeps coming back
Keeps coming back
Posts: 820
Joined: 2017-10-10, 21:20

Re: On pages that abuse embedded youtube

Unread post by Goodydino » 2022-06-18, 20:41

Disabling media autoplay prevents autoplay on any YouTube embeds that I have seen.

User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-19, 01:25

Goodydino wrote:
2022-06-18, 20:41
Disabling media autoplay prevents autoplay on any YouTube embeds that I have seen.
Youtube embedded doesn't autoplay even if you don't have media autoplay disabled. But their nature is JavaScript, too many of scripts is always a problem with Pale Moon's dated script engine. Multi-processing of modern Firefox deals with these scripts without any problems. No hangs. No lags. But multi-processing is out of the question. It's not compatible with Pale Moon's philosophy. So the workaround is somehow to not load these scripts. This can be done either by NoScript or using the UbO's trick above to block them. Hope it helps.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: On pages that abuse embedded youtube

Unread post by andyprough » 2022-06-19, 04:20

nguyen9173 wrote:
2022-06-19, 01:25
Multi-processing of modern Firefox deals with these scripts without any problems. No hangs. No lags.
That's completely untrue, Firefox routinely has significant problems with youtube and other video sites. A quick search through the Mozilla support forum turns up literally thousands of complaints about Firefox's problems with youtube, and thousands more for other video sites.

User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-19, 07:56

andyprough wrote:
2022-06-19, 04:20
That's completely untrue, Firefox routinely has significant problems with youtube and other video sites. A quick search through the Mozilla support forum turns up literally thousands of complaints about Firefox's problems with youtube, and thousands more for other video sites.
There has nothing to do with main youtube.com website my friend. We are mentioning youtube embedded. Youtube embedded is nothing but a script. Too much youtube embedded means too much scripts. That's it. What I said is the multi-processed Firefox has no problems dealing with websites using/abusing of too many scripts. Got it?

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: On pages that abuse embedded youtube

Unread post by andyprough » 2022-06-19, 12:29

nguyen9173 wrote:
2022-06-19, 07:56
There has nothing to do with main youtube.com website my friend. We are mentioning youtube embedded. Youtube embedded is nothing but a script. Too much youtube embedded means too much scripts. That's it. What I said is the multi-processed Firefox has no problems dealing with websites using/abusing of too many scripts. Got it?
Not sure where you are going with this, there are of course numerous complaints about Firefox javascript engine failing to handle embedded youtube and other embedded videos. Again, your original statement is simply untrue. What you could say is that Firefox does sometimes handle them properly, but at quite a large cost of increased resources and increased attack surface and increased numbers of cve's. It's not a zero sum game to simply switch over to multiprocess with Firefox's (or Chrome's) javascript engines. There are significant costs and frequent failures involved.

User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-19, 14:03

andyprough wrote:
2022-06-19, 12:29
Not sure where you are going with this, there are of course numerous complaints about Firefox javascript engine failing to handle embedded youtube and other embedded videos. Again, your original statement is simply untrue. What you could say is that Firefox does sometimes handle them properly, but at quite a large cost of increased resources and increased attack surface and increased numbers of cve's. It's not a zero sum game to simply switch over to multiprocess with Firefox's (or Chrome's) javascript engines. There are significant costs and frequent failures involved.
I only know one thing for sure is Firefox JS engine is much much faster than Pale Moon. We should end here.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: On pages that abuse embedded youtube

Unread post by andyprough » 2022-06-19, 19:01

nguyen9173 wrote:
2022-06-19, 14:03
I only know one thing for sure is Firefox JS engine is much much faster than Pale Moon.
Maybe on your particular Windows/hardware combination, along with any unusual settings or extensions you are using. On Debian based Linux systems with default settings and an adblocker I haven't noticed any dramatic speed difference between recent versions of the two browsers.

User avatar
nguyen9173
Banned user
Banned user
Posts: 95
Joined: 2022-06-02, 13:38

Re: On pages that abuse embedded youtube

Unread post by nguyen9173 » 2022-06-19, 19:22

    andyprough wrote:
    2022-06-19, 19:01
    nguyen9173 wrote:
    2022-06-19, 14:03
    I only know one thing for sure is Firefox JS engine is much much faster than Pale Moon.
    Maybe on your particular Windows/hardware combination, along with any unusual settings or extensions you are using. On Debian based Linux systems with default settings and an adblocker I haven't noticed any dramatic speed difference between recent versions of the two browsers.
    On any hardware Firefox and Chrome will be faster than Pale Moon. Multi-processing is the right choice for a web browser. Multi-threading like Pale Moon will always be the loser, and more easier prone to lags, crashes and hangs. On multi-processing browsers like Firefox and Chrome, a single process or a handful of processes could be crashed but the browser as a whole will not crash. On Pale Moon, if you have a faulty tab you are pretty much lost. The entire application will crash. The same drawback of any multi-threading application.

    Lucio Chiappetti
    Astronaut
    Astronaut
    Posts: 654
    Joined: 2014-09-01, 15:11
    Location: Milan Italy

    Re: On pages that abuse embedded youtube

    Unread post by Lucio Chiappetti » 2022-06-19, 20:41

    nguyen9173 wrote:
    2022-06-19, 19:22
    [On any hardware Firefox and Chrome will be faster than Pale Moon. Multi-processing is the right choice for a web browser.
    If you think so, just don't use it.

    My habits do not involve to frequent many video sites, but occasionally I do watch on YouTube seminars, conferences or other ceremonies without any problem on Pale Moon. For WebRTC conferencing (google meet or zoom) I use chrome, but that's more or less the only case.
    The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

    User avatar
    Nuck-TH
    Project Contributor
    Project Contributor
    Posts: 197
    Joined: 2020-03-02, 16:04

    Re: On pages that abuse embedded youtube

    Unread post by Nuck-TH » 2022-06-19, 20:42

    nguyen9173 wrote:
    2022-06-19, 19:22
    On any hardware Firefox and Chrome will be faster than Pale Moon. Multi-processing is the right choice for a web browser. Multi-threading like Pale Moon will always be the loser, and more easier prone to lags, crashes and hangs. On multi-processing browsers like Firefox and Chrome, a single process or a handful of processes could be crashed but the browser as a whole will not crash. On Pale Moon, if you have a faulty tab you are pretty much lost. The entire application will crash. The same drawback of any multi-threading application.
    Performance and crash resistance are not inherent virtues of multiprocess. It can be very well achived in multithreaded application if things are proopperly separated into different threads and errors are robustly handled. Multiprocess just masks all that by allowing scroll when JS and DOM choke on modern abominations of websites(content is still frozen while gears are grinding) and crash just retarts content process. That is at cost of unending barrage of severe security issues and breaking compatibility(and then ditching alltogether) with old extensions.

    Multithread implementation can(and should) be improved(and there were plans for that), but, guess what? Developers are stuck with implementing newest google shinies, because users eat them alive if they don't. So, you choose - improve performance and become completely irrelevant compatibility-wise, or improve compatibility dragging on with current inner machinery. It is no-win situation, but too much demands and too little actual help.

    User avatar
    nguyen9173
    Banned user
    Banned user
    Posts: 95
    Joined: 2022-06-02, 13:38

    Re: On pages that abuse embedded youtube

    Unread post by nguyen9173 » 2022-06-20, 04:57

    Nuck-TH wrote:
    2022-06-19, 20:42
    Performance and crash resistance are not inherent virtues of multiprocess. It can be very well achived in multithreaded application if things are proopperly separated into different threads and errors are robustly handled. Multiprocess just masks all that by allowing scroll when JS and DOM choke on modern abominations of websites(content is still frozen while gears are grinding) and crash just retarts content process. That is at cost of unending barrage of severe security issues and breaking compatibility(and then ditching alltogether) with old extensions.
    Only in theory. Moonchild himself admit everything is a mess and not separate from the main thread on Pale Moon. The only kind of multi-threading that somewhat has a form of crash resistant is of Java. I have never seen any native C++ based application have that capability.

    User avatar
    Moonchild
    Pale Moon guru
    Pale Moon guru
    Posts: 35474
    Joined: 2011-08-28, 17:27
    Location: Motala, SE
    Contact:

    Re: On pages that abuse embedded youtube

    Unread post by Moonchild » 2022-06-21, 16:41

    nguyen9173 wrote:
    2022-06-20, 04:57
    Only in theory. Moonchild himself admit everything is a mess and not separate from the main thread on Pale Moon. The only kind of multi-threading that somewhat has a form of crash resistant is of Java. I have never seen any native C++ based application have that capability.
    Don't put words in my mouth. :thumbdown:
    "Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
    "Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
    "Linux makes everything difficult." -- Lyceus Anubite

    Locked