fenix icon indicating copy to clipboard operation
fenix copied to clipboard

Display "Slow Script" notification in Fenix

Open liuche opened this issue 6 years ago • 18 comments

see ac issue: https://github.com/mozilla-mobile/android-components/issues/4437

What is the user problem or growth opportunity you want to see solved?

When a user is on a slow website that is behaving badly, we should show a notification to explain that.

Desktop has this notification, is it present on Fenix?

How do you know that this problem exists today? Why is this important?

If a website is slowing down the site, we should explain that so the user may be able to take action.

Who will benefit from it?

Users visiting slow sites.

┆Issue is synchronized with this Jira Task

liuche avatar Sep 10 '20 17:09 liuche

So these should work

dom.max_chrome_script_run_time
dom.max_ext_content_script_run_time
dom.max_script_run_time
dom.max_script_run_time_without_important_user_input

kbrosnan avatar Sep 10 '20 21:09 kbrosnan

@liuche Is there something for the Android front-end Performance team to do with this issue?

Malclir avatar Sep 16 '20 22:09 Malclir

@MarcLeclair hmm, I guess that this doesn't trigger when users are using dark reader? I wonder if there are any numbers that the Perf team would recommend us setting these values to, if we want to surface bad website behavior.

If the perf team has numbers about script run time, we might consider a recommendation from the perf team about whether we want to change these numbers. If you don't have ballpark #s on average, excessive, etc script time then I don't think there are any actions (unless that's something that the perf team might be collecting later).

liuche avatar Sep 17 '20 01:09 liuche

Triage: we believe ecsmyth is doing investigations into "slow script" notifications on mobile. Moving to waiting to hear back more.

mcomella avatar Sep 23 '20 23:09 mcomella

Looks like we might not be showing the dialog #6060

kbrosnan avatar Sep 24 '20 08:09 kbrosnan

My current work on long running scripts is limited to Desktop (PRD). At present, I don't have any plans to investigate the issue on mobile.

ecsmyth avatar Sep 24 '20 19:09 ecsmyth

Spoke to ecsmyth: we may be able to take the related telemetry from desktop and possibly use the existing UI. However, mobile users have different expectations around interruptions and the mobile UX team has the expertise there – we think this might be more appropriate for the fenix team to develop as a feature rather than performance work. FYI @liuche

mcomella avatar Sep 24 '20 19:09 mcomella

We'll keep it on our board for now to make sure it gets prioritized by the Fenix team.

mcomella avatar Sep 24 '20 19:09 mcomella

A consideration: the requirements may change when mobile fission comes into play: only part of the page may become locked up (e.g. an ad) instead of the whole page and this could be less important.

mcomella avatar Sep 30 '20 21:09 mcomella

Triage: we don't think this is appropriate for the normal inter-team process so when we'll talk to the fenix team about scheduling it when @liuche returns. Keeping in triage so we remember to do that.

mcomella avatar Sep 30 '20 23:09 mcomella

@mcomella When will mobile fission be active?

rsssxd avatar Oct 15 '20 20:10 rsssxd

Screenshot_20201015-231654398_1

rsssxd avatar Oct 15 '20 20:10 rsssxd

@mcomella When will mobile fission be active?

@acreskeyMoz Do you have details on fission for fenix?

mcomella avatar Oct 16 '20 23:10 mcomella

@mcomella It will be after Fission for Desktop. More details in a thread I made in #web-platform, slack.

acreskeyMoz avatar Oct 20 '20 19:10 acreskeyMoz

Bas has observed that fenix stops working on bbc sometimes. The Content area freezes. New urls won't load. Stopping and restarting browser only way to get it working. It seems like the content process is hanging, possibly due to slow script. If the content process is hanging, we should notify the user.

Triage: important for users, P1.

Note: to notify user, will likely need UX input for this. Alternatively, restart content process if hanging for 10s or something.

mcomella avatar Dec 08 '21 21:12 mcomella

The api we need to handle is https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoSession.ContentDelegate.html#onSlowScript(org.mozilla.geckoview.GeckoSession,java.lang.String)

kbrosnan avatar Feb 15 '22 22:02 kbrosnan

I started working on the issue that exposes the onSlowScript callback in AC.

Since the API returns a SlowScriptResponse, saying whether we want the slow script to continue running or to stop it, how should we notify the user? and how would the user interact with the notification to decide between stop and continue for the slow script?

Another question I have is whether or not the slow script feature that will be used by Fenix will be lifecycle aware or not.

@topotropic, is there any design or specs about how this should look and behave?

Alexandru2909 avatar Mar 16 '22 14:03 Alexandru2909

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1807309

Change performed by the Move to Bugzilla add-on.

cpeterso avatar Dec 23 '22 20:12 cpeterso