Closed Bug 696179 Opened 13 years ago Closed 13 years ago

search engine "alias" getter caching is broken, results in many unnecessary synchronous SQLite reads when entering text in the location bar

Categories

(Firefox :: Search, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 10

People

(Reporter: Gavin, Assigned: Gavin)

Details

Attachments

(1 file, 1 obsolete file)

We iterate over all engines and retrieve their "alias" to compare to the entered text (for triggering search engines using a keyword). Unfortunately the getter for the alias doesn't cache a null result, which means that we end up hitting SQLite for the value multiple times in the common case (engines not having an alias).

(Jeff was seeing this hit the disk every time, which seems like a failure of caching for SQLite, since this DB is very small and should fit in memory. That's a separate issue that needs investigation though.)
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #568481 - Flags: review?(rflint)
Attachment #568481 - Flags: review?(rflint) → review+
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #0)
> (Jeff was seeing this hit the disk every time, which seems like a failure of
> caching for SQLite, since this DB is very small and should fit in memory.
> That's a separate issue that needs investigation though.)

It appears as though this was just rereading of the lock page, which is expected. I have however filed a bug on getting rid of that read too: bug 696364.
Attached patch patchSplinter Review
I changed my mind about this after thinking about the "alias" getter - I think it's best to have aliases continue to be |null| if they're not set, rather than |""|. So to preserve that behavior I'm just switching to use "undefined" as the uninitialized value.
Attachment #568481 - Attachment is obsolete: true
Attachment #568698 - Flags: review?(rflint)
Attachment #568698 - Flags: review?(rflint) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/3cf9011b5494
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 10
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/3cf9011b5494
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: