Firefox hangs on start with many bookmarks in Other Bookmarks
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox120 | --- | wontfix |
| firefox121 | --- | verified |
| firefox122 | --- | verified |
People
(Reporter: wgollino, Assigned: mak)
References
(Regression)
Details
(Keywords: perf, regression, Whiteboard: [sng][places-performance])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0
Steps to reproduce:
I can reproduce by:
- Create a new profile
- Set the bookmarks toolbar to be visible
- Add 3000 bookmarks to "Other Bookmarks"
- Close Firefox
- Start Firefox - hangs for 10-15 seconds
- Open new window - hangs for 10-15 seconds again
Actual results:
Firefox is unresponsive for 10-15 seconds at startup and when creating a new window:
- Window is partially rendered
- User can't interact with any part of Firefox for 10-15 seconds
- Window finishes rendering, page content loads, user can interact.
Expected results:
Browser should not freeze at startup or when creating a new window. User should be able to immediately interact with the browser.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Bookmarks & History' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Reporter | ||
Comment 2•2 years ago
|
||
On Firefox 119, the browser hangs at start-up for 10-15 seconds when there are many bookmarks in "Other Bookmarks". As well, the browser hangs when creating a new window. This seems to be a regression in 119 - I didn't experience it before in 118, and it does not happen when I downgrade to 118.
A potential workaround for users is to hide "Other Bookmarks" from the toolbar, as the browser only seems to hang at start-up/on new window when:
- There are many bookmarks in "Other Bookmarks"
- The Bookmarks toolbar is shown
- "Other Bookmarks" item is shown on the Bookmarks toolbar
More info on my setup:
- This is on Linux (Kubuntu)
- With approximately 3000 bookmarks in "Other Bookmarks"
| Assignee | ||
Comment 3•2 years ago
|
||
Could you please take a performance profile using the Firefox Profiler as outlined at https://profiler.firefox.com?
There's specific instructions to get a startup profile.
IF you'r ehaving difficulties we'll try on our own (though the results may differ due to a different env, thus I'd prefer to get your perf profile).
| Assignee | ||
Updated•2 years ago
|
| Reporter | ||
Comment 4•2 years ago
|
||
Sure - captured a startup profile here: https://share.firefox.dev/40NLMX8
| Assignee | ||
Comment 5•2 years ago
|
||
I see a 217ms jank when we populate the bookmarks toolbar.
That is followed by a 10,2s jank where we're again reading the contents of the Other bookmarks folder here https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/browser/base/content/browser-places.js#2203
Both of those seem to spend most of the time in sqlite3VdbeExec, so we're effectively reading from the database. It shouldn't be that slow though, 3000 bookmarks is not much, so it's like the disk is extremely slow in reading data.
- which kind of disk do you have, is it an SSD?
- Which filesystem is in use on the Firefox profile partition?
| Assignee | ||
Comment 6•2 years ago
|
||
Do you use bookmark tags? If yes, how many tags do you have, approximately?
| Assignee | ||
Comment 7•2 years ago
|
||
I can reproduce after adding about 11K bookmarks to other bookmarks, investigating.
Updated•2 years ago
|
| Assignee | ||
Comment 8•2 years ago
|
||
This is a regression of bug 1846361, in particular the query is spending a huge amount of time to fetch tags per each url.
Comment 9•2 years ago
|
||
Set release status flags based on info from the regressing bug 1846361
| Assignee | ||
Comment 10•2 years ago
|
||
Removing the needinfo as I don't need further information to fix the issue.
Thank you for reporting it with the profile, it was very useful.
Comment 11•2 years ago
|
||
:daisuke, since you are the author of the regressor, bug 1846361, could you take a look?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 12•2 years ago
|
||
The problem is due to reading tags per each bookmark, as unfortunately the
current tags layout is sub-optimal. For now we can either optimize for many
bookmarks or for many tags, as we know only few users use tags, and very few
have many of them (due to legacy add-ons), the only viable approach for now is
to pre-cache tags in the queries that are fetching many bookmarks.
In the future we should redesign the tags storage.
| Assignee | ||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
| bugherder | ||
Comment 15•2 years ago
|
||
The patch landed in nightly and beta is affected.
:mak, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox121towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 16•2 years ago
|
||
The problem is due to reading tags per each bookmark, as unfortunately the
current tags layout is sub-optimal. For now we can either optimize for many
bookmarks or for many tags, as we know only few users use tags, and very few
have many of them (due to legacy add-ons), the only viable approach for now is
to pre-cache tags in the queries that are fetching many bookmarks.
In the future we should redesign the tags storage.
Original Revision: https://phabricator.services.mozilla.com/D194506
Updated•2 years ago
|
Comment 17•2 years ago
|
||
Uplift Approval Request
- Is Android affected?: no
- Explanation of risk level: This is touching some bookmarks queries, so in case of unknown bugs it may partially break some bookmarks functionality.
- String changes made/needed: none
- Needs manual QE test: yes
- User impact if declined: Hang when opening a browser window showing the bookmarks toolbar, including the first one. Hangs when opening certain bookmark folders if they contain thousands bookmarks.
- Steps to reproduce for manual QE testing: Add 3000-10000 bookmarks to Other Bookmarks, make sure the bookmarks toolbar is visible with Other Bookmarks on it, open a new window. Firefox will hang for a few seconds (depending on the machine) without the patch.
- Code covered by automated testing: yes
- Risk associated with taking this patch: medium
- Fix verified in Nightly: no
Comment 18•2 years ago
|
||
Comment on attachment 9365582 [details]
Bug 1861811 - Hang on window open with many bookmarks in the toolbar or Other Bookmarks. r=daisuke
Approved for 121.0b5.
Updated•2 years ago
|
Comment 19•2 years ago
|
||
| uplift | ||
Updated•2 years ago
|
Comment 20•2 years ago
|
||
I've reproduced this issue with Fx 121.01 (2023-10-28) on Windows 10 and Fx 121.0b4 on Ubuntu 22 (with around 11K bookmarks).
The hang is no longer reproducible on Fx 122.0a1 (2023-11-28) and Fx 121.0b5 (treeherder build) on Windows 10, macOS 13 and Ubuntu 22.
Updated•2 years ago
|
Description
•