Closed
Bug 616019
Opened 15 years ago
Closed 15 years ago
10mb places.sqlite database due to aggressive file growth.
Categories
(Core Graveyard :: History: Global, defect)
Tracking
(fennec2.0b4+)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | 2.0b4+ | --- |
People
(Reporter: dougt, Assigned: dougt)
References
Details
Attachments
(3 files)
1.79 KB,
patch
|
sdwilsh
:
review-
|
Details | Diff | Splinter Review |
1.90 KB,
patch
|
sdwilsh
:
review-
dougt
:
feedback+
|
Details | Diff | Splinter Review |
884 bytes,
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
On desktop, we worry alot about fragmention. On mobile, we care a bit more about footprint. Our sqlite files tend to frag a bunch on desktop, so we aggresively bump their side. For example, the places file grows in increments of 10mbs.
http://mxr.mozilla.org/mozilla-central/search?string=SetGrowthIncrement
On mobile, I am not sure that this value is correct. For a very small profile, I already have a 10mb file I need to read in (or parts of it).
If I compare with and without the call to SetGrowthIncrement:
1) clean profile
2) launch go to people.mozilla.org/~dougt
3) exit
4) launch
5) record data
with call:
places.sqlite file size: 10mb
total memory used: 84mb res
without call:
places.sqlite file size: 992k
total memory used: 83mb res
I am not sure what the ideal value for SetGrowthIncrement, but I think on mobile we can do better assuming that there isn't much of a startup cost.
Taras, do you have any input on changing these values for mobile?
Comment 1•15 years ago
|
||
See bug 597215
Assignee | ||
Comment 2•15 years ago
|
||
yeah, that isn't the best way to fix that. what about meego, maemo, iphone, palm, desktop, blah.
would anyone mind if we added prefs for this or a new configure options similar to MOZ_GFX_OPTIMIZE_MOBILE but for non-gfx code?
Comment 3•15 years ago
|
||
(In reply to comment #2)
> would anyone mind if we added prefs for this or a new configure options similar
> to MOZ_GFX_OPTIMIZE_MOBILE but for non-gfx code?
Prefs can be difficult; we'd have to be careful when we lookup the value since database connections can be opened off of the main thread.
Comment 4•15 years ago
|
||
I think a pref would be best.
Assignee | ||
Comment 5•15 years ago
|
||
i'll patch mobile-browser separately.
Assignee: nobody → doug.turner
Attachment #494757 -
Flags: review?(sdwilsh)
Assignee | ||
Updated•15 years ago
|
tracking-fennec: --- → ?
Updated•15 years ago
|
tracking-fennec: ? → 2.0b4+
Comment 6•15 years ago
|
||
did you consider a numeric pref, say, in case I'd prefer a 1MB increment?
Comment 7•15 years ago
|
||
...the wording then being something like, toolkit.storage.maxGrowthIncrement, to cap the callers' suggestions
Assignee | ||
Comment 9•15 years ago
|
||
Comment on attachment 495011 [details] [diff] [review]
dueling patches (central)
i think 10 was chosen to avoid fragmentation. not sure of the value of having that value dynamic. But, either approach will work for me. Taras?
Comment 10•15 years ago
|
||
(In reply to comment #9)
> Comment on attachment 495011 [details] [diff] [review]
> dueling patches (central)
>
> i think 10 was chosen to avoid fragmentation. not sure of the value of having
> that value dynamic. But, either approach will work for me. Taras?
I like the dynamic approach, 1mb will still reduce fragmentation. 10 was chosen based on firefox places io pattern.
My only concern is that for best perf this number should be tweaked for each individual db, but short of adding a pref for every growth-increment user, i think this is a good tradeoff.
Assignee | ||
Comment 11•15 years ago
|
||
Comment on attachment 495011 [details] [diff] [review]
dueling patches (central)
PR_INT32_MAX shouldn't be the default fallback. :)
Attachment #495011 -
Flags: review?(sdwilsh)
Attachment #495011 -
Flags: feedback?(doug.turner)
Attachment #495011 -
Flags: feedback+
Comment 12•15 years ago
|
||
Both of these patches suffer from the same threadsafety issues. This should be built on top of the work in bug 580790.
Depends on: 580790
Assignee | ||
Comment 13•15 years ago
|
||
lets add an #ifdef in the short term so that maemo doesn't get killed by this bug.
Comment 14•15 years ago
|
||
How are we changing the ifdef exactly?
Assignee | ||
Comment 15•15 years ago
|
||
Attachment #495122 -
Flags: review?(sdwilsh)
Comment 16•15 years ago
|
||
Comment on attachment 495122 [details] [diff] [review]
work around until we fix the other bugs.
r=sdwilsh
Attachment #495122 -
Flags: review?(sdwilsh) → review+
Comment 17•15 years ago
|
||
Attachment #494757 -
Flags: review?(sdwilsh) → review-
Comment 18•15 years ago
|
||
Attachment #495011 -
Flags: review?(sdwilsh) → review-
Assignee | ||
Comment 19•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1ad47fdb9195
if someone cares, they can file a new bug about making this a preference. or maybe we will the next time we bring up a new platform.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•