Open Bug 2036572 Opened 2 months ago Updated 2 months ago

Testcase navigating to N URLs rapidly spends 9seconds in the SQL thread

Categories

(Toolkit :: Places, defect, P3)

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [sng-dragon])

Attachments

(1 file)

Attached file History and SQL.html

Open testcase
Click Run, or alternately enable "thrash mode" and click run

Samply: https://share.firefox.dev/42OhoNT
Gecko: https://share.firefox.dev/48Al09I

Testcase generated using chatgpt, so 100% artificial. Maybe something to improve?

Based on what the page is trying to do, I think what we see is expected.
24% of the time is spent on system fsync, that is necessary for data safety, this is when transaction gets committed.
21% of the time in recalculating Frecency of the newly inserted page. We could delay this but then the urlbar wouldn't react immediately to new visits, that may be unexpected by the user. We could check if we can reduce cost of frecency recalculation.
4% of the time is the actual page inserts.

An interesting 30% of the time is spent in AsyncTryToCopyFavicons... this could definitely be delayed, and the inserts seem a bit expensive, probably not wrapped in a transaction. We should investigate why we spend so much time there, part of it is likely because redirects tracking is inefficient.
This query is slow.
So for this async favicons copy, we should investigate: batching, delay, slow inserts, slow redirects tracking.

For the rest, we could check if we can speed up frecency calculations.

Severity: -- → S3
Component: SQLite and Embedded Database Bindings → Places
Depends on: 1999939
Keywords: perf
Priority: -- → P3
Product: Core → Toolkit
Whiteboard: [sng-dragon]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: