bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Handle long running scripts better.

NEW
Unassigned

Status

()

Core
DOM
P5
normal
12 years ago
17 days ago

People

(Reporter: johann.petrak@gmail.com, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
Currently the message "A script on this page my by busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete." is shown when some script takes too much time running. 

It seems this message is shown when *any* javascript runs too long, no matter if the script is from an extension, from a web site, or whatever other possibilities exist. 

Whatever the reason, the message does not help the user in *any* way to decide what to do. The user has no idea which script is running long here, has no idea whether some extension or the loaded page is responsible and has no idea what will happen or break if the script is terminated or left running.

This in turn leads to a big number of bug reports where people complain about this happening, with the only advice that is usually given to increase the dom.max_script_run_time value. 

The way how long running scripts get handled should be completely reworked.
First, it should show more information, especially if it is likely that an extension or the web page itself is responsible and also which extension or which loaded file contained the script and what the name of the function is.

The information about extension/web page could help the user to decide what to do, e.g. not use an extension that is often causing this problem any longer.

The information about the source file name and function name could help developers and people looking at bug reports figure out the problem and give better advice. 

It would also be good to show this message not in an alert but in an overlay similar to the one shown when a popup window wants to be opened.
This overlay could also include a link that points to an explanatory help page.
Bug 335058 already made the slow script delay separate for chrome/content, and changed them to 20/10 seconds, respectively.

Bug 341764 added a "debug" button for people with JS debuggers installed.

I don't think doing anything more than that is going to be useful for average users.
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
(Reporter)

Comment 2

12 years ago
(In reply to comment #1)
> Bug 335058 already made the slow script delay separate for chrome/content, and
> changed them to 20/10 seconds, respectively.
> 
> Bug 341764 added a "debug" button for people with JS debuggers installed.
> 
> I don't think doing anything more than that is going to be useful for average
> users.
> 

I disagree. Increasing the timeout will make it a bit less frequent that his happens but also make it more frequent that users have to watch a page being busy for a rather long time now (20 seconds is an eternity,really).

The debug button is definitely not for the average user. An alert dialog is looking scary.

Those two measures do nothing to inform the average user more or help him with deciding what to do or making this look less scary. I do believe that what I propsed does that. 
(In reply to comment #2)
> The debug button is definitely not for the average user. An alert dialog is
> looking scary.

I don't see what you're trying to say. A debug button is "not for the average user", but "information about the source file name and function name" is? We should try to avoid showing the dialog at all, not try and make it useful to people who have no idea why it appears.
(Reporter)

Comment 4

12 years ago
(In reply to comment #3)
> (In reply to comment #2)
> > The debug button is definitely not for the average user. An alert dialog is
> > looking scary.
> 
> I don't see what you're trying to say. A debug button is "not for the average
> user", but "information about the source file name and function name" is? We
> should try to avoid showing the dialog at all, not try and make it useful to
> people who have no idea why it appears.
> 
OK, I will try to make this clearer because I have mentioned several things that are based on different reasonings.
The most important aspect for usability is to make it easier for users to *somehow* react. If this happens frequently, something must be done, but how can the user decide what? My response: if this is caused by an extension, the extension name should be given. This will enable the user to either avoid the extension in the future or accept the problem. If it is caused by the web page, the user at least knows that the slowness is specific to something done by the site he is visiting, not FF in general.
Simply not doing anything sounds bad, because it allows for DOS attacks and also, a website that is busy for a long time is probably even more confusing than this message.
My suggestion to avoid the alert and show something similar to the popup blocker message is also meant to make this less scary and more consistent with the rest of FF.
Finally, my suggestion to show additional detailled information (file name and function name) was mainly meant to give the user more information to report to an admin or to report in a bug report. E.g. this could help to figure out scripts in extensions that are problematic, based on the reports given by users in the bug database. This was not primarily inteded for the web page developer -- for this person, the debug button is probably the better tool.

However, since it seems to be FF philosophy to not include features targeted to web developers by default but leave that to extensions, the debugging feature too sounds more like something for an extension. 


Personally, my biggest request would be to know what extension is responsible and (as I might be inclined to help with correcting the problem) which script/function of that extension. My feeling is that 100% of the cases where I experience this problem are caused by some extension -- but which???
Assignee: general → nobody
QA Contact: ian → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.