Display "Slow Script" notification in Fenix
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
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
@liuche Is there something for the Android front-end Performance team to do with this issue?
@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).
Triage: we believe ecsmyth is doing investigations into "slow script" notifications on mobile. Moving to waiting to hear back more.
Looks like we might not be showing the dialog #6060
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.
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
We'll keep it on our board for now to make sure it gets prioritized by the Fenix team.
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.
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 When will mobile fission be active?

@mcomella When will mobile fission be active?
@acreskeyMoz Do you have details on fission for fenix?
@mcomella It will be after Fission for Desktop. More details in a thread I made in #web-platform, slack.
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.
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)
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?
Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1807309
Change performed by the Move to Bugzilla add-on.