Lusito / forget-me-not

Make the browser forget website data, except for the data you want to keep.
zlib License
226 stars 25 forks source link

Slower startup when Forget Me Not is installed #201

Open yoasif opened 4 years ago

yoasif commented 4 years ago

Decided to try to figure out why my browser was loading page slowly after loading up my windows from my saved session.

Took profiles with other add-ons disabled and with FMN enabled to hopefully give someplace to start investigating.

No add-ons: https://www.dropbox.com/s/a9vs4thguutvha5/Firefox%202019-12-13%2017.33%20profile-no-add-ons.json.gz?dl=0

Forget Me Not enabled: https://www.dropbox.com/s/ndjcvvqgyd8ay6c/Firefox%202019-12-13%2017.44%20profile-with-forget-me-not.json.gz?dl=0

Lusito commented 4 years ago

Thanks for the report.

What exactly is slow? Your title says startup (Browser startup?), but your description says loading a page is slow.

What is your scenario like?

I'll try to take a look at this after the holidays, since it's currently a busy time for me.

yoasif commented 4 years ago

I have 14 windows open now (I have the profile I recorded the profiles in backed up, so I can do more testing on it if needed) with around 2000 tabs open but not loaded.

What is slow is after loading the windows in the session after restarting Firefox, the initial load of pages takes a long time (I restart fairly often, since I run nightlies and those update twice a day). Without add-ons installed, it happens within a few seconds after the windows appear, but with FMN, it adds up to half a minute if not longer before pages begin to appear inside those windows.

I have exported my settings and attached them here.

Please let me know how I can help.

I'll try to take a look at this after the holidays, since it's currently a busy time for me.

Understood of course - I'm happy you are interested in looking into such an extreme use case. :)

forget-me-not-settings.zip

ghost commented 4 years ago

I've also had this issue. The browser starts and the page will try to load, and it sits there spinning for a good 5-10 seconds. How I found this is a long story but, I think this might help you get to the root of this:

image

Note that the buttons for managing cookies are greyed out? They stay like that while the page load hangs, and the moment those buttons become visible, the page loads as normal (basically instantly, I'm on a fast PC with fast internet)

It seems like the entire cookie handling system is unresponsive during the slow load. I'm not sure if FMN is causing the system to become unresponsive, or if an unresponsive system is causing FMN to pause the page load... Is there anything you might suggest for me to test for you? I'd like to help :)

By the way, mine is not such an extreme use-case, I only have about 50 tabs open and maybe 1/3 of them are loaded during any session.

ghost commented 4 years ago

I think I have a way to fix this. Simply delete the cookies and site data. All of it.

image

Through a lengthy process of elimination, I noticed that the issue went away, if I unticked two boxes - the cleanup options for Local Storage and Indexed DB. Accordingly, I cleared that storage out a little to see if things improved, but while I was there, I noticed some oddities - like, sites I had not visited in over a year, which had 22MB of storage (compared to the typical 200k-500k), and there was no rule to never clean, but cleaning through FMN did not remove that site, either on startup automatically, or manually. It seemed to me, that my storage was corrupted, as firefox was having trouble calculating its size, and FMN couldn't clean things from it. When I tried to remove items manually, sometimes it would hang for up to a minute, which is forever on this machine.

I tried all manner of things before finally taking a backup of my profile and removing that storage. It's worked, so I'll just have to re-login to some sites, but I kept my cache and everything else and everything is working as normal now.