-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected memory usage spike soon after launch #3231
Comments
@meldra Thanks for raising this, and thanks for such a detailed report! 🙏 I ran this test locally and wasn't able to reproduce it out of the box (memory usage is stable at around 150MB for me), so I'm now interested in figuring out what's different between our setups such that this issue would manifest. I'll do some memory leak investigation this week, but for now I have some quick questions:
|
Happens with or without pages or additional tabs open. I do note that the longer I tested this for, the slower the spike took to happen. The report is detailed because every time I reproduced a prior assumption got challenged :)
No it's not. It's still offering me the "sync with another device" button.
I do not have privacy pro, no. The protections pane has:
In case there is any - albeit unlikely - chance of this being relevant, I am connected to a wireguard vpn. iCloud private relay is off.
Just what I agreed to import from firefox, which is actually literally just the default firefox stuff. I'm that kind of weirdo that doesn't typically bookmark or favorite things. |
After leaving the browser open all night, its memory footprint dropped to 350ish mb and this no longer happens at launch. |
Ok I've purged and reinstalled. It's not reproducing, but I also didn't get the click-through tutorial thingy. Where's it saving that state? edit: Freshly reinstalled memory usage sitting at half of what it was before reinstall. |
I did eventually figure out where to remove the cache. However, I have not been able to reproduce this issue at all since. If you didn't find a memory leak, probably best to call it an edge case. |
@samsymons I might have tracked down where to look closer. I've not been able to reproduce the exact workflow as before. But! I have reinstalled DDG a few times trying to figure out what's going on because curiosity, and I have seen other bonkers memory use. When I uninstall, I use App Cleaner to remove everything so I don't miss stuff. This last time I uninstalled it, I noticed that the containers directory I need to remove manually was over 16GB. The Database.sqlite inside the directory was 16.1GB. I've also noticed that importing stuff from firefox has been veeeeerrry laggy, similar to #3234, and it also stops responding and as I said earlier I don't have bookmarks other than the defaults. So, I've just reinstalled again focusing on the import process.
Reloading the browser doesn't fix it. The burn button doesn't fix it. Restarting it after the burn button doesn't fix it. Deleting Database.sqlite and reloading the browser does fix it. Are you in the mood for a 11+ GB .sqlite file by any chance? |
I installed the browser (Version 1.104.0 (251)) on my MBP 14" M1 (Sonoma 14.6.1 (23G93)) for the first time yesterday to check it out, which I've been meaning to do for a while now. After poking around for a while (I forget which settings I changed, sorry) I opened
Activity Monitor
and saw that the browser had hoarded a bunch of memory, pushing thememory pressure
graph into the yellow range, so I closed it.I have (repeatedly) run a simple test to reliably reproduce this.
Activity Monitor
.Memory
tab inActivity Monitor
, specifically theDuckDuckGo
row.Expected behavior:
I have run the same test on an old HP core-i5 on Windows 10 22h2 and it peaked at 600-something MB of memory before dropping back under 500MB. This is more like what I expected.
Actual behavior:
Between 10 seconds and up to a minute after step 2, the memory allocation began to increase dramatically then plateaued briefly at around 4GB. After a short while, about a GB of memory was released over the span of 20 or more seconds before the browser grabbed more, ballooning to as much as 13.5GB (and likely would have gone higher.)
Eventually, the browser releases some of the memory by itself going back down to around 7GB (which is still too much!) It'll hold on to those 7GB even if you close all tabs. The more times you run the test, the quicker it releases this memory. I guess because it has less competition for that memory soon after releasing it, and can get the cause of this over and done with sooner.
The memory was only fully released after step 4.
The text was updated successfully, but these errors were encountered: