Changing the time limit for the script to be considered "unresponsive" [solved] 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!
Trupik

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

Unread 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: 35648
Joined: 2011-08-28, 17:27
Location: Motala, SE

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

Unread 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.
"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

Trupik

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

Unread 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
Keeps coming back
Keeps coming back
Posts: 827
Joined: 2017-10-10, 21:20

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

Unread 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: 35648
Joined: 2011-08-28, 17:27
Location: Motala, SE

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

Unread 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.
"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