Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

[Bug] 8-second hang in nComputeLineBreaks when presenting a certain set of suggested URLs #6985

Closed
bholley opened this issue May 11, 2020 · 2 comments
Assignees
Labels
performance Performance related issues

Comments

@bholley
Copy link

bholley commented May 11, 2020

I can reproduce this reliably on my device with my account history synced.

The pathology here looks similar to mozilla-mobile/fenix#1824, except I'm not sure whether there's an actual long URL involved, and if so, what it is.

Performance profile: https://perfht.ml/2WHW9ef

STR (for me):

  • Open up Fenix
  • type "pen" in the URL box, which offers some search suggestions, and history-based suggestions.
  • Tap any of the suggestions (in the case of the profile, penny-arcade.com/comic). Alternatively, just scrolling around the suggestions also hangs.

Results:

  • 8 second hang.
  • Bottom half (or so) of the viewport is black.

Device information

  • Android device: Android 10
  • Fenix version: Fenix Nightly 20200505094621

┆Issue is synchronized with this Jira Task

@csadilek
Copy link
Contributor

Verified this is caused by awesomebar suggestions with very long descriptions (URLs) or titles.

I have a fix for this in A-C so I am moving this ticket over. There's a follow-up fixed needed for mozilla-mobile/fenix#1824 to cover actually tapping on such a suggestion, and displaying it in the toolbar.

@csadilek csadilek transferred this issue from mozilla-mobile/fenix May 14, 2020
@csadilek csadilek added the performance Performance related issues label May 14, 2020
csadilek added a commit to csadilek/android-components that referenced this issue May 14, 2020
csadilek added a commit to csadilek/android-components that referenced this issue May 15, 2020
csadilek added a commit to csadilek/android-components that referenced this issue May 15, 2020
bors bot pushed a commit that referenced this issue May 15, 2020
6990: Closes #6985: Make sure suggestion with long title/desc doesn't freeze UI r=pocmo a=csadilek

We're already truncating in the view itself, but if the string is extremely long e.g. a 30K bookmarklet the UI hangs (see #6985). So, with this, we truncate any excessive title/description to prevent this case.

Co-authored-by: Christian Sadilek <[email protected]>
@bors bors bot closed this as completed in 8eaec2a May 15, 2020
@bholley
Copy link
Author

bholley commented May 19, 2020

This is fixed for me in the latest nightly. Thanks!

bors bot pushed a commit that referenced this issue May 20, 2020
7031: Closes #5249: Long URI in the address bar will hang the UI r=pocmo a=csadilek

We've had two cases now where this was a problem. A bookmarklet (see #6985) and a data URI (#5249).

This fix is similar to the one we landed last week for our Awesomebar (csadilek@bba846d), but tapping on long URLs or copying them from the clipboard etc. would still cause the UI to hang. With data URIs I can reproduce seconds/minutes long hangs that are fixed with this.

Took this from Fennec (https://github.com/pocmo/fennec-graveyard/blob/master/mobile/android/chrome/content/browser.js#L4308), and applied to both display and edit toolbar (otherwise the UI would hang once the toolbar is in edit mode).

7044: Issue #2985: Add fallback in case Promise.any not available r=jonalmeida a=csadilek

This is handling `promise.any` not being available (current beta). The only part we miss is the optimization to let the faster operation of fetch|cache win, but that's fine for now.

Co-authored-by: Christian Sadilek <[email protected]>
bors bot pushed a commit that referenced this issue May 20, 2020
7031: Closes #5249: Long URI in the address bar will hang the UI r=pocmo a=csadilek

We've had two cases now where this was a problem. A bookmarklet (see #6985) and a data URI (#5249).

This fix is similar to the one we landed last week for our Awesomebar (csadilek@bba846d), but tapping on long URLs or copying them from the clipboard etc. would still cause the UI to hang. With data URIs I can reproduce seconds/minutes long hangs that are fixed with this.

Took this from Fennec (https://github.com/pocmo/fennec-graveyard/blob/master/mobile/android/chrome/content/browser.js#L4308), and applied to both display and edit toolbar (otherwise the UI would hang once the toolbar is in edit mode).

Co-authored-by: Christian Sadilek <[email protected]>
@data-sync-user data-sync-user changed the title [Bug] 8-second hang in nComputeLineBreaks when presenting a certain set of suggested URLs FXP-985 ⁃ [Bug] 8-second hang in nComputeLineBreaks when presenting a certain set of suggested URLs Feb 22, 2021
@data-sync-user data-sync-user changed the title FXP-985 ⁃ [Bug] 8-second hang in nComputeLineBreaks when presenting a certain set of suggested URLs [Bug] 8-second hang in nComputeLineBreaks when presenting a certain set of suggested URLs May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
performance Performance related issues
Projects
None yet
Development

No branches or pull requests

3 participants