Closed
Bug 518804
Opened 15 years ago
Closed 14 years ago
Places DB flusher, does not handle system-idle state, and drain battery on mobile devices
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla2.0b9
People
(Reporter: romaxa, Unassigned)
References
Details
(Whiteboard: [fixed-in-places])
Attachments
(1 file)
kDefaultSyncInterval = 120; - 2 minutes?
We should suspend Database flusher, when in idle state, also it would be nice to remove repeating timer:
When database changed, or some amount of not synced changes available in Database, then run one-shot timer which will sync database once.
Comment 1•15 years ago
|
||
It's a bad idea to change the timer - what happens when something like weave (or any other api consumer) decides to write bookmarks and history during this time? If we don't flush, we'll get increased memory use, and possible data loss.
Reporter | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> It's a bad idea to change the timer - what happens when something like weave
> (or any other api consumer) decides to write bookmarks and history during this
I would suggest to not do anything during that time (suspend weave too), and if something happen, it should create one-shot timer and do flush once when it needed
> time? If we don't flush, we'll get increased memory use, and possible data
> loss.
Comment 3•15 years ago
|
||
expiration must be rewritten before, since the flusher is also doing expiration at this time.
Actually we could probably do something like that, instead of flushing every 2 minutes, flush on history notifications but only if 2 minutes have elapsed from last flush, this should not require any timer.
Comment 4•15 years ago
|
||
(In reply to comment #2)
> I would suggest to not do anything during that time (suspend weave too), and if
> something happen, it should create one-shot timer and do flush once when it
> needed
Sure, we can control weave, but we can't control other add-ons.
Comment 5•14 years ago
|
||
Would it be possible to flush every 2 minutes, but suspend the timer if nothing relevant has been done since the last time? (In other words, is it straightforward to find out whether something relevant has been done, that requires writing?)
Comment 6•14 years ago
|
||
(In reply to comment #5)
> Would it be possible to flush every 2 minutes, but suspend the timer if nothing
> relevant has been done since the last time? (In other words, is it
> straightforward to find out whether something relevant has been done, that
> requires writing?)
We could, but the whole script is going away in bug 552023 which will be landing for Firefox 4.
Comment 7•14 years ago
|
||
(In reply to comment #6)
> (In reply to comment #5)
> > Would it be possible to flush every 2 minutes, but suspend the timer if nothing
> > relevant has been done since the last time? (In other words, is it
> > straightforward to find out whether something relevant has been done, that
> > requires writing?)
> We could, but the whole script is going away in bug 552023 which will be
> landing for Firefox 4.
Cool. Thanks for the info!
Comment 10•14 years ago
|
||
fixed by dependecies
Status: NEW → RESOLVED
Closed: 14 years ago
OS: Linux → All
Hardware: Other → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in
before you can comment on or make changes to this bug.
Description
•