Closed Bug 1675829 Opened 4 years ago Closed 3 years ago

Allow disabling the cookie database in the profile

Categories

(Core :: Networking: Cookies, task, P2)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mossop, Assigned: nalexander)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged][fidedi-ope])

Attachments

(2 files, 2 obsolete files)

The background update agent will use an ephemeral profile, it will be deleted when the agent exits. Even so we would like to reduce the amount of file I/O the agent generates by disabling writing things to the profile where possible.

The cookie service always creates a cookies database in the profile regardless of whether any networking occurs but it also has a private mode that functions without the database so this bug will add a way to always use that mode and not create the database at all when running in the background.

Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [necko-triaged]

Background tasks run with a temporary profile and we want to reduce disk I/O by
stopping things from writing to the profile where doing so is straightforward.
Since the cookie service already supports in-memory storage for private browsing
we can easily disable the persistent storage when running a background task.

Note that this depends on the patch in https://phabricator.services.mozilla.com/D96481.

Attachment #9188649 - Attachment is obsolete: true

Background tasks run with a temporary profile and we want to reduce disk I/O by
stopping things from writing to the profile where doing so is straightforward.
Since the cookie service already supports in-memory storage for private browsing
we can easily disable the persistent storage when running a background task.

Attachment #9192697 - Attachment description: Bug 1675829 - Disable persistent cookie storage when running background tasks. r?valentin → Bug 1675829 - Disable persistent cookie storage when running background tasks. r?baku

I'm not working on this, Nick is this still needed or can it just be closed?

Assignee: dtownsend → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(nalexander)

(In reply to Dave Townsend [:mossop] (Out May 3-14) from comment #3)

I'm not working on this, Nick is this still needed or can it just be closed?

It is still a nice to have; it'll show up more as we get to Bug 1679443.

Flags: needinfo?(nalexander)

Firefox background tasks use a new temporary profile directory for
every invocation. We would like to write as little data as possible
into the temporary profile directory in this mode. This patch allows
to make the persistent cookie storage discard cookies just like
private cookie storage.

This approach simply uses that the base CookieStorage class is close
to sufficient already. There may be a performance impact with more
virtual invocations, but none of these functions seem likely to be
hot.

Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Attachment #9192697 - Attachment is obsolete: true
Whiteboard: [necko-triaged] → [necko-triaged][fidedi-ope]

NI to baku to answer https://phabricator.services.mozilla.com/D139910#inline-773464 and suggest a docstring.

Flags: needinfo?(amarchesini)
Flags: needinfo?(amarchesini)
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/09bb73dac836 Allow disabling the cookie database in the profile with `network.cookie.noPersistentStorage`. r=baku https://hg.mozilla.org/integration/autoland/rev/51c22199741b Post: Make background tasks not persist cookie database. r=bytesized
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: