Closed Bug 2017227 Opened 3 months ago Closed 3 months ago

Reduce the impact of Database::Shutdown currently doing a "PRAGMA optimize(0x02)"

Categories

(Toolkit :: Places, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: jstutte, Assigned: jstutte)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

PRAGMA optimize(0x02) was introduced by bug 1354032, before SQLite introduced the analysis limit. We can reduce the impact of analysis on large databases by using the mask 0x12 instead.

Blocks: 1679425

PRAGMA optimize(0x02) replaces the default mask (0x0fffe), which
disables the 0x10 row-limiting flag. This means ANALYZE runs without
a row limit and can take a long time on large places.sqlite databases,
contributing to shutdown hangs.

Switch to 0x12 (0x02 | 0x10) at shutdown to cap ANALYZE runtime.
Also add PRAGMA optimize to PlacesDBUtils idle maintenance with
0x10012 to cover long-running sessions where shutdown is infrequent.

Summary: Reduce the impact of Database::Shutdown doing a "PRAGMA optimize(0x02)" → Reduce the impact of Database::Shutdown currently doing a "PRAGMA optimize(0x02)"
See Also: → 1354032
Assignee: nobody → jstutte
Attachment #9545635 - Attachment description: WIP: Bug 2017227 - Use time-bounded PRAGMA optimize for Places databases r?#places-reviewers → Bug 2017227 - Use time-bounded PRAGMA optimize for Places databases r?#places-reviewers
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: