Closed Bug 1613107 Opened 5 years ago Closed 1 year ago

history (and tab?) based suggestions in addressbar sometimes delayed by several seconds

Categories

(Firefox :: Address Bar, defect, P2)

defect
Points:
8

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: aryx, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Firefox 74.0a1 on Windows 8.1

Every few days, the address bar doesn't properly populate the history based suggestions in a timely fashion, they can be delayed >10s while the "Search with foo" and "Search in a Private Window" items are shown. The biggest chance to reproduce is if the machine is paging due to RAM limitations.

Slow queries according to about:telemetry:

WITH frecency_stats(count, sum, squares) AS ( SELECT CAST((SELECT IFNULL(value, 0.0) FROM moz_meta WHERE key = :private) AS REAL), CAST((SELECT IFNULL(value, 0.0) FROM moz_meta WHERE key = :private) AS REAL), CAST((SELECT IFNULL(value, 0.0) FROM moz_meta WHERE key = :private) AS REAL) ), autofill_frecency_threshold(value) AS ( SELECT CASE count WHEN 0 THEN 0.0 WHEN 1 THEN sum ELSE (sum / count) + (:stddevMultiplier * sqrt((squares - ((sum * sum) / count)) / count)) END FROM frecency_stats ) SELECT :query_type, fixed_up_host || :private, IFNULL(:prefix, prefix) || moz_origins.host || :private, frecency, bookmarked, id FROM ( SELECT host, host AS fixed_up_host, TOTAL(frecency) AS host_frecency, ( SELECT TOTAL(foreign_count) >... /* places.sqlite */
Frequently >5s, once even >50s

COMMIT /* places.sqlite */
Once occurrence with 110s, one with 178s

/* do not warn (bug 487789) / SELECT :query_type, h.url, h.title, EXISTS(SELECT 1 FROM moz_bookmarks WHERE fk = h.id) AS bookmarked, ( SELECT title FROM moz_bookmarks WHERE fk = h.id AND title NOTNULL ORDER BY lastModified DESC LIMIT 1 ) AS btitle, ( SELECT GROUP_CONCAT(t.title, :private) FROM moz_bookmarks b JOIN moz_bookmarks t ON t.id = +b.parent AND t.parent = :parent WHERE b.fk = h.id ) AS tags, h.visit_count, h.typed, h.id, t.open_count, h.frecency FROM ( SELECT ROUND(MAX(use_count) * (1 + (input = :search_string)), 1) AS rank, place_id FROM moz_inputhistory WHERE input BETWEEN :search_string AND :search_string || X:private GROUP BY place_id ) AS i JOIN moz_places h ON h.id = i.place_id LEFT JOIN moz_openpages_temp t ON t.url = h.url AND t.userContextId = :userContextId WHERE AUTOCOMPLETE_MATCH(NULL, h.url, IFNULL(btitle, h.title), tags, ... / places.sqlite */
Few occurrences, up to 7s

The first query is related to autofill. Looks like we have room to improve it... We should check the telemetry dashboard and see how common that is (assuming that's possible). Although if the two "Search with" results appear while this is happening, that might imply that Firefox already finished the autofill query and so the problem is somewhere else...?

Priority: -- → P2
Regressed by: 1239708
Has Regression Range: --- → yes
Keywords: regression
Points: --- → 8
Severity: normal → S3

Is this performance issue still being encountered?

Flags: needinfo?(aryx.bugmail)
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(aryx.bugmail)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.