Closed Bug 1234210 Opened 9 years ago Closed 8 years ago

Only update accessibility pref lastLoadDate on shutdown

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: jimm, Assigned: jimm)

Details

Attachments

(1 file)

Someone reported in bug 1233874 that accessibility.lastLoadDate is getting updated frequently during their session. I wasn't expecting this, I assumed nsBaseWidget::GetRootAccessible() would get called infrequently. There's probably some overhead here we can eliminate by setting a bool flag and updating this value on shutdown.
Attached patch patchSplinter Review
Attachment #8700607 - Flags: review?(tbsaunde+mozbugs)
(In reply to Jim Mathies [:jimm] from comment #0)
> Someone reported in bug 1233874 that accessibility.lastLoadDate is getting
> updated frequently during their session. I wasn't expecting this, I assumed
> nsBaseWidget::GetRootAccessible() would get called infrequently. There's
> probably some overhead here we can eliminate by setting a bool flag and
> updating this value on shutdown.

hmm, so I have some questions:

- do we have data on how many users shut down normally?  I suspect I basically never do and firefox either crashes or is otherwise force killed, but I can certainly believe that's unusual.

- is it ok to write prefs this far into shutdown? I guess you've tested that and it works?
(In reply to Trevor Saunders (:tbsaunde) from comment #2)
> (In reply to Jim Mathies [:jimm] from comment #0)
> > Someone reported in bug 1233874 that accessibility.lastLoadDate is getting
> > updated frequently during their session. I wasn't expecting this, I assumed
> > nsBaseWidget::GetRootAccessible() would get called infrequently. There's
> > probably some overhead here we can eliminate by setting a bool flag and
> > updating this value on shutdown.
> 
> hmm, so I have some questions:
> 
> - do we have data on how many users shut down normally?  I suspect I
> basically never do and firefox either crashes or is otherwise force killed,
> but I can certainly believe that's unusual.

no but if we don't shutdown properly that's another bug. :) FWIW I've tested this in nightly and it works as expected.

> 
> - is it ok to write prefs this far into shutdown? I guess you've tested that
> and it works?

yes, I've test this. The shutdown method this code runs in is in response to a pre-xpcom shutdown observer event. The profile is still available here.
(In reply to Jim Mathies [:jimm] from comment #3)
> (In reply to Trevor Saunders (:tbsaunde) from comment #2)
> > (In reply to Jim Mathies [:jimm] from comment #0)
> > > Someone reported in bug 1233874 that accessibility.lastLoadDate is getting
> > > updated frequently during their session. I wasn't expecting this, I assumed
> > > nsBaseWidget::GetRootAccessible() would get called infrequently. There's
> > > probably some overhead here we can eliminate by setting a bool flag and
> > > updating this value on shutdown.
> > 
> > hmm, so I have some questions:
> > 
> > - do we have data on how many users shut down normally?  I suspect I
> > basically never do and firefox either crashes or is otherwise force killed,
> > but I can certainly believe that's unusual.
> 
> no but if we don't shutdown properly that's another bug. :) FWIW I've tested
> this in nightly and it works as expected.

ok thanks, lets just hope not many people either kill -9 their browser or run out of battery.
Attachment #8700607 - Flags: review?(tbsaunde+mozbugs) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a65ccabdef2e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: