Open Bug 1313227 Opened 8 years ago Updated 2 years ago

Rethink Slow Script dialog / notification bar

Categories

(Firefox :: General, enhancement)

50 Branch
enhancement

Tracking

()

People

(Reporter: shorlander, Unassigned)

References

Details

+++ This bug was initially created as a clone of Bug #1307125 +++

While looking into bug 1307125 I had some questions about whether or not prompting users to make what in most cases is probably an uninformed choice is the right way to handle slow scripts.

If a script is causing Firefox to hang what are the odds that selecting "Wait" or "Continue" is going to fix it? In my limited experience with this choosing "Wait/Continue" usually just throws the warning again with the same question. Do we have any data on that?

Choosing "Stop It" can (probably will?) break the site leaving users in a bad state. So neither of the options is really great most of the time.

Is there a reason we shouldn't try to be more proactive here? For example stop the script automatically and inform people about that instead of asking them to make an unclear decision? E.g. "The site wellsfargo.com is causing Firefox to slow down. We stopped it so it wouldn't slow you down, you should reload the site so it works properly. [Cancel] [Reload]"


If we do indeed think that a notification bar with a question is the right thing to do, there are other ways the experience could be improved:

- Should probably not use the Gran Paradiso robot icon ;)
- It says "A *web page* is slowing down your browser." That's not very helpful. Can we say which web page?
  -- We have a badging system for crashed tabs, maybe reuse that with another icon to indicate which tab is being problematic?
- Might be worth it to be more verbose here about the repercussions. Maybe change the "What would you like to do?" to "Would you like to stop it or wait and see if it recovers?"
- If a user chooses "Wait" and it doesn't recover we could change the messaging to say something about how the site *still* hasn't recovered and would you like to "Wait Again". Would be a good cue that things don't seem to be getting better.
I think one of the core questions here is if "Wait" is actually providing value to users. (*cough* telemetry?) I would also be inclined to just make this informational... Don't ask the user, just immediately kill the script and let them know (in that tab).

I was curious what mobile does here. I don't have an Android device handy, but Safari on iOS just seems to do... Nothing. (infiniteloop2.html on bug 1164286 runs for a couple minutes without any kind of prompt). I'm not sure if that's a sign mobile browsers just don't care about this issue, or if users actually want to wait (especially since mobile tends to be slower, but then maybe most people just close the tab).

If I'm reading TMO right, for the SLOW_SCRIPT_NOTICE_COUNT there were ~144M telemetry submissions from Beta-50 over the last month, and 2.36M (1.6%) reported showing a prompt... 80% saw it 1-2 times, 95% saw it 1-8 times. Would be interesting to see how this looks by-user (instead of raw submission counts), since I'd expect these are not randomly distributed.
Even "reload" is problematic. Like "wait," if the issue is in the site's script, reload is likely to just recreate the same problem. Looking at the wellsfargo.com example (from bug 1307125), if this renders a site useless to a user, what action should they take? Report that to us? Report that to the site?

I agree we should stop the script. But whatever other option we give them should be encouraging them to do something other than hitting their head against the same wall.
I would feel a lot better about automatically stopping scripts if we weren't so often wrong about which script was causing the problem. Stopping random scripts isn't likely to make things better.
(In reply to David Durst [:ddurst] from comment #2)
> Even "reload" is problematic. Like "wait," if the issue is in the site's
> script, reload is likely to just recreate the same problem. Looking at the
> wellsfargo.com example (from bug 1307125), if this renders a site useless to
> a user, what action should they take? Report that to us? Report that to the
> site?
> 
> I agree we should stop the script. But whatever other option we give them
> should be encouraging them to do something other than hitting their head
> against the same wall.

From the bug reports I have read a lot of the time the slow down warning seems to be caused by a cumulative problem. In other words a website works fine for a while but eventually starts to affect Firefox performance. So reload in those cases would maybe at the least reset the problem.

I would be interested to hear ideas about other meaningful actions we can give people. If the problem is with the script itself there isn't much we can do for them. Prompting people to report a technical problem to a website probably isn't very helpful because they would have to jump through hoops to do that. It will just add extra frustration. 

We could add an option to report it to us. We would control that experience and something actionable could come out of it. But like crash reporting that might do more harm than good if the problem is a recurring one. "I keep reporting this to Firefox but it keeps happening!"
(In reply to :Gijs Kruitbosch from comment #3)
> I would feel a lot better about automatically stopping scripts if we weren't
> so often wrong about which script was causing the problem. Stopping random
> scripts isn't likely to make things better.

But if the site is already busted would it make it worse? If we aren't confident that we can stop the right thing shouldn't we stop all of the things?
The cases where I've seen Wait be useful are when my computer is thrashing temporarily for some reason (disk scanning, building Firefox, etc.), but it seems the bar is removed automatically when the situation improves.
(In reply to Stephen Horlander [:shorlander] from comment #5)
> (In reply to :Gijs Kruitbosch from comment #3)
> > I would feel a lot better about automatically stopping scripts if we weren't
> > so often wrong about which script was causing the problem. Stopping random
> > scripts isn't likely to make things better.
> 
> But if the site is already busted would it make it worse? If we aren't
> confident that we can stop the right thing shouldn't we stop all of the
> things?

Not when we start blaming random things when the computer is trashing for other reasons... that'll just break random websites in random ways for effectively no reason at all.
Blocks: 1315416

(In reply to Stephen Horlander [:shorlander] (If you're waiting on a response please ping me on Slack or Riot) from comment #0)

  • It says "A web page is slowing down your browser." That's not very
    helpful. Can we say which web page?

I was presented with this notification bar moments ago and saw that it hadn't changed in ages. The main issue I had with it (and obviously still have) is exactly that the message does not say which web page it talks about. Depending on what you are working on, stopping some page is like playing russian roulette. Telling the user this bit of information would let them make an actual decision.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.