Way to kill running scripts?

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!
Zorba
Apollo supporter
Apollo supporter
Posts: 40
Joined: 2018-04-29, 08:43

Way to kill running scripts?

Post by Zorba » 2024-04-19, 12:54

Operating system: Windows 7
Browser version:33.0.1
32-bit or 64-bit browser?: 64

Is there a feature in PM that stops all running scripts? I get the impression that the browser is often bogged down/slow to respond due to something running in the background. Thanks

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2499
Joined: 2018-05-05, 13:29

Re: Way to kill running scripts?

Post by vannilla » 2024-04-19, 13:26

Yes, there is and in one of the latest releases it has been made automatic (it used to show a confirmation dialog in earlier versions).
If it doesn't happen soon enough you can reduce the timeout in about:config, though right now I'm not sure which setting it was so I'll defer this to more knowledgeable people.

User avatar
ron_1
Knows the dark side
Knows the dark side
Posts: 3049
Joined: 2012-06-28, 01:20

Re: Way to kill running scripts?

Post by ron_1 » 2024-04-19, 20:50

Scripts from twitter are notorious for slowing down Pale Moon. Use a blocker (like uBlock Origin).

User avatar
suzyne
Keeps coming back
Keeps coming back
Posts: 782
Joined: 2023-06-28, 22:43
Location: Australia

Re: Way to kill running scripts?

Post by suzyne » 2024-04-19, 21:11

I think these are all the relevant config preferences.

dom.always_stop_slow_scripts
dom.max_script_run_time
dom.max_chrome_script_run_time
Laptop 1: Windows 11 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.
Laptop 3: Linux Mint 20.3 64-bit, i5 @ 2.5GHz, 8GB, Intel HD Graphics 620.

Zorba
Apollo supporter
Apollo supporter
Posts: 40
Joined: 2018-04-29, 08:43

Re: Way to kill running scripts?

Post by Zorba » 2024-04-20, 09:48

Thanks very much.

I've reduced these to 10 and 15 respectively. These are seconds presumably? Seems to be improved...

PS: tried 2 and 3 - big difference!

User avatar
Moonchild
Project founder
Project founder
Posts: 38678
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Way to kill running scripts?

Post by Moonchild » 2024-04-20, 11:57

Be careful because making them too short will break functionality of websites and the browser. You should not stop chrome scripts that quickly because that governs the browser's internals and stopping those scripts prematurely will cause all sorts of trouble.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
jars_
Lunatic
Lunatic
Posts: 427
Joined: 2016-12-27, 00:12

Re: Way to kill running scripts?

Post by jars_ » 2024-04-20, 13:54

Extension KillSpinners (CAA: killspinners@byo.co.il.xpi).
or CustomButtons button:

Code: Select all

function  allStop3() {
   let visTabs = gBrowser.visibleTabs;
       visTabs.forEach( tab => {
         let browser = gBrowser.getBrowserForTab(tab);
             browser.stop();
             browser.webNavigation.stop(2);
         })
 }


User avatar
Navigator
Fanatic
Fanatic
Posts: 152
Joined: 2023-02-24, 17:53

Re: Way to kill running scripts?

Post by Navigator » 2024-04-20, 15:25

Moonchild wrote:
2024-04-20, 11:57
Be careful because making them too short will break functionality of websites and the browser. You should not stop chrome scripts that quickly because that governs the browser's internals and stopping those scripts prematurely will cause all sorts of trouble.
Is this comment regarding "10 and 15" or "2 and 3" above?

User avatar
Moonchild
Project founder
Project founder
Posts: 38678
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Way to kill running scripts?

Post by Moonchild » 2024-04-20, 16:17

Navigator wrote:
2024-04-20, 15:25
Is this comment regarding "10 and 15" or "2 and 3" above?
Yes. ;)

10/15 may fail on older hardware.
2/3 almost guaranteed to cause issues.

In general you should always leave the "chrome" setting alone. Only "content" matters.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite