Closed
Bug 403375
Opened 17 years ago
Closed 17 years ago
content pref database does full table scan for most common query
Categories
(Firefox :: Settings UI, defect, P3)
Firefox
Settings UI
Tracking
()
RESOLVED
FIXED
Firefox 3 beta3
People
(Reporter: myk, Assigned: myk)
References
(Depends on 1 open bug)
Details
(Keywords: perf)
Attachments
(2 files)
5.50 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
5.16 KB,
patch
|
Details | Diff | Splinter Review |
The content pref database does a full table scan of the prefs table when the content pref service executes its most common query: retrieving the value of a single pref for some site.
This can be avoided with the judicious use of indices, specifically indices on the name columns in the groups and settings tables and an index across both groupID and settingID in the prefs table.
Here's a patch that adds those indices.
Note: this performance issue won't show up in our existing automated tests because those use fresh profiles with empty databases for which a full table scan looks just as fast as an index-based lookup. But this patch will make a difference as users accumulate site-specific preference data.
Attachment #288190 -
Flags: review?(mconnor)
Assignee | ||
Comment 1•17 years ago
|
||
Requesting wanted-firefox3 on this performance improvement for site-specific preferences.
Flags: blocking-firefox3?
Priority: -- → P3
Updated•17 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Comment 2•17 years ago
|
||
Comment on attachment 288190 [details] [diff] [review]
patch v1: adds indices
Looks good, sorry for the delay here.
Attachment #288190 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 3•17 years ago
|
||
Here's a version of the patch that has been updated to fix minor conflicts from the checkin for bug 385224. This is the version of the patch I'll check in.
Assignee | ||
Comment 4•17 years ago
|
||
Checking in toolkit/components/contentprefs/src/nsContentPrefService.js;
/cvsroot/mozilla/toolkit/components/contentprefs/src/nsContentPrefService.js,v <-- nsContentPrefService.js
new revision: 1.12; previous revision: 1.11
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•