Closed Bug 2059881 Opened 1 month ago Closed 14 days ago

[Nova] extreme lag typing in address bar with vertical tabs and lots of tabs

Categories

(Firefox :: Sidebar, defect)

defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox153 --- unaffected
firefox154 --- unaffected
firefox155 --- disabled
firefox156 --- fixed

People

(Reporter: dveditz, Assigned: baku)

References

(Blocks 3 open bugs, Regression)

Details

(Keywords: regression)

With Nova enabled and vertical tabs typing in the address bar gets laggy, and is unusable if you have a lot in that window (for example, 1200). Problem goes away if I turn off Nova. The problem ALSO goes away if I close the sidebar, or if I switch back to horizontal tabs even if I keep Nova turned on. I don't know why typing in the address bar would cause the sidebar to be doing anything, but profiling shows all the time is going to layout.

Steps I profiled:

  1. start the profiler (toolbar button)
  2. Cmd+L to focus the address bar
  3. type testing
  4. stop the profiler.

~10 tabs, Nova, sidebar closed: https://share.firefox.dev/4w1jJRY
~10 tabs, Nova, vertical tabs open: https://share.firefox.dev/3TwPDIu           jank visible in profile but felt OK
~10 tabs, not Nova, vertical tabs open: https://share.firefox.dev/4fvY53j

~1300 tabs, Nova, sidebar closed: https://share.firefox.dev/3Tr5ngd
~1300 tabs, Nova, vertical tabs open: https://share.firefox.dev/4x6irWO          THE REALLY BAD ONE
~1300 tabs, not Nova, vertical tabs open: https://share.firefox.dev/4br60fL

The above profiles were taken with vertical tabs as the full sidebar, but it seems to be the same if the sidebar is showing Bookmarks or History with the tabs collapsed to the favicon strip.

With that many tabs, opening the vertical tab sidebar (Ctrl+Z) is a little janky, but closing it with Ctrl+Z beach-balls for more than 12 seconds before anything happens. The opening visual jank (especially on the side opposite the sidebar) happens with a small number of tabs, too, so this might be unrelated to my address bar performance problem.

"sidebar closed" means completely gone: I have checked the "Hide tabs and sidebar" option (sidebar.visibility set to hide-sidebar)

The Bugbug bot thinks this bug should belong to the 'Firefox::Sidebar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Sidebar

Hey Marcus, any help on this would be appreciated.

Flags: needinfo?(mstange.moz)

Similar "bad perf with lots of tabs" bugs:

  • bug 2054065 is about switching tabs in the same window with lots of tabs; reporter blames a new sidebar CSS selector
  • bug 2059857 is about switching windows with lots of tabs. Not clear if it's vertical tabs or not

Bug 2054065 in particular might be related. It makes sense to me that you'd have to update the sidebar if you switched tabs: the active tab highlight has to move. I don't know how typing in the address bar triggers sidebar layout, but clearly there's some connection because closing the sidebar minimizes the problem. Maybe this is the same bug at its heart -- or mostly the same plus exposing possibly unwanted connection between typing in the address bar and refreshing the sidebar. Obviously navigating is a different story -- that requires updating the tab strip.

See Also: → 2059857, 2054065

(In reply to Daniel Veditz [:dveditz] from comment #0)

~1300 tabs, Nova, vertical tabs open: https://share.firefox.dev/4x6irWO          THE REALLY BAD ONE

There are a number of really long UpdateAnchorPosLayout markers in this one.

The container tabs icon started using anchor positioning here in bug 2054407.

Seems we're not doing a lot of layout work, but just going through the anchor-positioned elements and computing their validity etc...

Keywords: regression
Regressed by: 2054407

Set release status flags based on info from the regressing bug 2054407

Status: NEW → RESOLVED
Closed: 28 days ago
Duplicate of bug: 2056929
Resolution: --- → DUPLICATE

Hm, so the positioned element is scoped by a nearby ancestor. We should be able to bail out early based on that.

Let me try swapping the checks here

Can we achieve the desired look without anchor positioning?

Flags: needinfo?(mstange.moz) → needinfo?(amarchesini)
Status: RESOLVED → REOPENED
No longer duplicate of bug: 2056929
Resolution: DUPLICATE → ---

:mstange, seems like so, given Bug 2058198 & this comment

Ah yes, bug 2058198 just landed which does so. Nice!

Dan, once bug 2058198 makes it into Nightly, can you re-test and re-profile?

Flags: needinfo?(dveditz)

Waiting for the re-test/re-profile. NI if the results are bad again. Thanks

Flags: needinfo?(amarchesini)
See Also: → 2060891

The sidebar-closing beachball is gone, but the Addressbar Typing performance issue still exists.

10 tabs, no container tabs: https://share.firefox.dev/4g3bU8u
10 tabs, some container tabs: https://share.firefox.dev/4wmk8P1
1320 tabs still unusable: https://share.firefox.dev/4hs12Dk

Flags: needinfo?(dveditz) → needinfo?(amarchesini)

I re-did the 1300 tab profile in "troubleshooting mode" just in case the problem was due to some customization or add-on I have. Didn't seem to help: https://share.firefox.dev/4hm4hfA

Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)

Hi, there's a possibility this may have been resolved by the fix for bug 2056929 which landed on Friday, please could you check with an updated Nightly and see if this is improved?

Flags: needinfo?(dveditz)
See Also: → 2056929

Beautiful, thanks!

Status: REOPENED → RESOLVED
Closed: 28 days ago14 days ago
Depends on: 2056929
Flags: needinfo?(dveditz)
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch

1500 tabs, Nova, vertical tabs enabled, same steps as comment 0: https://share.firefox.dev/4i1CYYr

I don't see anything problematic in the profile and I didn't experience lag.

QA Whiteboard: [qa-triage-done-c157/b156]
You need to log in before you can comment on or make changes to this bug.