Closed Bug 1819135 Opened 1 year ago Closed 1 year ago

StorageActivityService causes wake-ups every 5 minutes while Firefox is completely idle

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P3)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

These timers are visible in long profiles of Firefox being idle (eg. https://share.firefox.dev/3kueUlv).

The repeating timer is created at https://searchfox.org/mozilla-central/rev/a3a9112d4d73d1323eabbc7faa9937cd9aae6465/dom/storage/StorageActivityService.cpp#211-213

If I understand the code correctly, it is used to cleanup data that has expired after 24 hours.

Instead of this repeating timer, could we instead have a one-shot timer set to fire the next time something needs to expire?
Or if this is only to remove data from memory and because it seems the data is small, could we instead cleanup when the data is accessed? Unless I missed something, the accesses are only calls to nsIStorageActivityService.getActiveOrigins. I found 2 callers and neither of them seems to be a hot code path.

We could also clean-up on the idle-daily observer notification.

Severity: -- → S3
Priority: -- → P3
Assignee: nobody → florian
Status: NEW → ASSIGNED
Pushed by fqueze@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3e80bc563a82
Cleanup expired origins in StorageActivityService on the idle-daily notification and when accessing the data instead of with a 5 minutes repeating timer, r=asuth.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Blocks: 1736916
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: