Open Bug 1853983 Opened 1 year ago Updated 7 months ago

Large hangs (4.1s) when navigating caused by having Library open with a search

Categories

(Toolkit :: Places, defect, P3)

defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

(Depends on 2 open bugs)

Details

(Keywords: perf, stalled)

Attachments

(1 obsolete file)

STR:

  • Open Library and enter a search
  • Navigate in Gmail

See https://share.firefox.dev/3roVt0I

Note, I have:
places.history.expiration.max_pages = 999999
places.history.expiration.transient_current_max_pages = 9999999
so most people probably don't have it as bad as me, but I find I expect having the defaults there won't get time in nsNavHistory::GetQueryResults down below 16ms

The severity field is not set for this bug.
:mak, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mak)

This is unfortunately "expected", and it's one of the reasons for which we limit the number of pages.

It's due to a series of architectural problems that we didn't address yet:

  1. Places views query on the main thread. Firefox View may potentially be a new async history view. We're also working to remove any non-refreshing query so that moving the queries off the main thread will be easier in the future, though we must figure out how to handle pending updates in the UI.
  2. We search for strings linearly (row by row), we can't use an index, because we don't have one. In this case the open query has a search string, a visited page changes title, and we must check if the query results may change. We're experimenting with full text indices yet due to localization concerns. An index would likely reduce this to milliseconds.

In this specific case, the search string matches the title of the newly added page, so we must update the query results. Doing an incremental update may add quite some complexity, so we just refresh the whole results. That's usually fast, but not if the database has to examine 900k rows and match a search string per each row.

While we're working on both issues, there's currently no ETA as some of the changes require experimentation and this refactoring it not our primary target of development (it's part of the 20% other stuff we're working on).

Severity: -- → S3
Depends on: placesFolders, 342913
Flags: needinfo?(mak)
Keywords: perf
Priority: -- → P3
Keywords: stalled
Depends on: 1340487
No longer depends on: 342913
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: