Changing the time limit for the script to be considered "unresponsive" [solved] Topic is solved

Users and developers helping users with technical Pale Moon issues (Windows and other non-Linux O.S.). Please direct questions about the Linux version to the appropriate Linux board.

Moderator: trava90

Forum rules
This board is for technical/usage questions and troubleshooting for the Pale Moon browser only. The main focus here is on Pale Moon on Windows. Please direct your questions for Linux, Android and Mac to the dedicated boards.
Technical issues and questions not related to the Pale Moon browser should be posted in "technical chat"
Please keep off-topic and general discussion out of this board, thank you!
Post Reply
User avatar
Trupik
Moongazer
Moongazer
Posts: 7
Joined: 2018-11-28, 07:24

Changing the time limit for the script to be considered "unresponsive" [solved]

Post by Trupik » 2020-06-30, 08:27

When the javascript on some website take to long to finish, Pale Moon spawns a warning window like this:
Warning: Unresponsive script

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: URL ... line X ...
Is there a way to tune the timeout value for the script to be considered "unresponsive" ? I would very much like to shorten it to one or two seconds, because the whole browser is unresponsive for what feels like an eternity before the warning is displayed, allowing me to kill the culprit.
Last edited by Trupik on 2020-06-30, 13:09, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27036
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Changing the time limit for the script to be considered "unresponsive"

Post by Moonchild » 2020-06-30, 12:19

You can change dom.max_script_run_time in about:config to the number of seconds you want this to be.
Making this too short (1 second is definitely too short) will cause issues because it will pop up the watchdog script on the (overly) large JS scripts commonly in use on websites that simply take a couple of seconds to compile and become responsive again. I don't recommend changing this pref from the default, but if you feel your hardware is sufficiently fast to avoid false positives you can shorten it. I don't think anything less than 10 is safe, and anything 5 or below is probably totally unusable.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
Trupik
Moongazer
Moongazer
Posts: 7
Joined: 2018-11-28, 07:24

Re: Changing the time limit for the script to be considered "unresponsive"

Post by Trupik » 2020-06-30, 13:08

Moonchild wrote:
2020-06-30, 12:19
You can change dom.max_script_run_time in about:config to the number of seconds you want this to be.
Thank you, this was exactly what I was looking for, but was unable to find. I will try to tweak the value until it works the best for me.

Goodydino
Astronaut
Astronaut
Posts: 594
Joined: 2017-10-10, 21:20

Re: Changing the time limit for the script to be considered "unresponsive" [solved]

Post by Goodydino » 2020-06-30, 18:48

Why was dom.max_chrome_script_run_time set as high as 90? With SeaMonkey I have it set to 30 and that works most of the time.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27036
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Changing the time limit for the script to be considered "unresponsive" [solved]

Post by Moonchild » 2020-07-01, 03:17

Goodydino wrote:
2020-06-30, 18:48
Why was dom.max_chrome_script_run_time set as high as 90? With SeaMonkey I have it set to 30 and that works most of the time.
That is for UI (chrome) scripts. Some of these scripts require a lot of time to complete, especially on slower hardware (e.g. bookmarks export/import scripts). In addition, having the watchdog pop up for chrome scripts and having the user click "stop script" will almost certainly break the browser, so we want to avoid it unless absolutely necessary.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

Post Reply