Closed Bug 726556 Opened 13 years ago Closed 11 years ago

Investigate reducing the sqlite page cache of extensions.sqlite/addons.sqlite

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: Unfocused, Assigned: Unfocused)

References

Details

The memory footprint of extensions.sqlite/addons.sqlite is large, considering the database size. We should figure out how to reduce that footprint - presumably by reducing sqlite's page cache. 

Mobile could handle a global change to the page cache, but desktop can't. If we can do it per-database then both mobile and desktop can get win.


Quoting bug 696141 comment 14:
> The RSS issue from the plugin sqlite database looks like it could be solved
> by reducing the pages size or the amount of pages cached for SQLite. It
> makes no sense to have 0.5M databases and caches that likely contain maybe
> 10k of data.
> 
> Given that *Gecko* SQLite is irrelevant in Fennec, I think this might be as
> simple as turning those settings down?
>  
> The main users that are still left would be the SQLiteBridge users.
> Migration is one time and not actually limited on the Gecko DB side, and
> then there's password manager, which I presume isn't performance limited at
> all.
CC'ing Marco because he knows far more about SQLite than I do. Hi Marco!
what large means? Here it's about 1MB, what's the expected size? Depending on the kind of queries you may have a memory-per-performance ratio to look at.
There are two things you can do here, the first one is reducing the cache size to a smaller value, the second one is figure out if there's a specific query that grows the cache size, and invoke a PRAGMA shrink_memory after it. Or you may identify a specific "last-action" after which the database will unlikely be accessed for a while, and shrink on it.
To limit the cache you can just PRAGMA cache_size=-N to limit it to (N*1024) bytes (works only on sqlite 3.7.10+)
Blocks: 696141
Assignee: nobody → bmcbride
Status: NEW → ASSIGNED
Depends on: 768312
WONTFIX, as we're moving to a JSON data format in bug 853388 / bug 853389.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.