Closed Bug 1602994 Opened 3 years ago Closed 3 years ago

Pressing "Clear Cookies and Site Data" button has a long delay before popup appears, if local storage used


(Toolkit :: Data Sanitization, defect, P2)

71 Branch



83 Branch
Tracking Status
firefox83 --- verified


(Reporter: nyanpasu64, Assigned: johannh)




(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

  • Use a browser profile with lots of data stored in local storage.
  • Visit any page with cookies.
  • Press the URL bar lock to open the "Site Information" panel.
  • Click "Clear Cookies and Site Data".

Actual results:

The panel remains open and nothing appears to happen for a few seconds, before the panel closes and the "Removing Cookies and Site Data" dialog appears.

If I click the button multiple times, a few seconds later, multiple dialog appear simultaneously.

If I close the dialog and press the button again (on the same tab with the same site open), I get a delay again.

(The delay was 2-4 seconds when I commented on #1468355. Now it's 1 second on, but 2-3 seconds on

Expected results:

The "Removing Cookies and Site Data" dialog appears immediately. Or if there's a long delay, at least there's a visual indication (like a spinner) that something's happening.

This is a follow-up to Earlier, the button didn't appear for 1 or more seconds. That bug has been fixed.

This new issue does not appear on a clean user profile, but appears on my main profile.

Clearing my main profile's extension list and about:config did not help. Moving my profile's storage folder out of my main profile folder fixed the delay.

I have Worldbrain's Memex (, which created a single sqlite DB taking up 750MB in the storage folder. Copying around half of my storage\default folder (100-ish megabytes, not including the 750MB file) to a clean profile was sufficient to reproduce this bug on my clean profile.

When on my clean profile with my main profile's storage\default, visiting, and trying to press "Clear Cookies and Site Data", I received a long delay, and the dialog contained a long list of Google-related domains which would be cleared.

On my clean profile, clearing all cookies using "Clear Recent/All History" (Ctrl Shift Del, "Everything") did not fix the delay, and I still received a long list of domains. Clearing all "Offline Website Data" fixed the delay, and all domains but "" disappeared.

I think the severity of this bug is related to how many domains show up on the dialog box. When clearing on my clean profile, I get 8-ish domains and a 1-second delay. On my main profile, I get 16-ish domains and a 2-second delay.

I am on Windows 10 1909, on a NTFS SSD partition. Merely iterating over all files in storage\default (using fd > nul) takes half a second. Using Windows Explorer to recursively clear the read-only flag of storage takes minutes.

Component: Untriaged → Data Sanitization
Ever confirmed: true
Priority: -- → P2
Product: Firefox → Toolkit
Assignee: nobody → jhofmann
Severity: normal → S3

We currently wait for all site data to be refreshed before showing the removal
dialog, in order to show the sites that will be affected from removal. This causes
some serious delay to the point of complete broken-ness on profiles with a lot of data.

Tests for this already exists and we're not adding any new functionality,
just optimizing the old behavior for better perceived performance.

Pushed by
Load site data into the remove dialog asynchronously. r=nhnt11,preferences-reviewers
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: qe-verify+

I tried to reproduce this issue using old Firefox and Nightly builds but I was unable to, I used a heavy profile with about 400mb data stored, also visited multiple google domains, clicked on Clear Cookies and Site Data button and it instantly opened. nyanpasu64 I know it has being a long time, but could you verify that this is no longer an issue with latest Firefox 83 beta 3 ?

Flags: needinfo?(nyanpasu64)

I'm on Firefox Developer Edition (83 beta) on Linux, and the dialog seems to open immediately. Thanks for the fix!

Flags: needinfo?(nyanpasu64)

(In reply to nyanpasu64 from comment #5)

I'm on Firefox Developer Edition (83 beta) on Linux, and the dialog seems to open immediately. Thanks for the fix!

Thanks for the quick verification.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.