Closed Bug 1891878 Opened 2 years ago Closed 2 years ago

I believe that Mozilla Firefox has memory leak issues.

Categories

(Core :: Performance: General, defect)

Firefox 124
Desktop
Windows 10
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: postandreply, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf:resource-use)

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

Steps to reproduce:

I always have three pinned tabs and one regular tab.

The regular tab is just an html page to my offline website.

The pinned tabs are a.) a Discord conversation that rarely gets new messages., b.) my Amazon Order History page, and c.) a Chinese comic that I am reading called Martial Peak.

If I completely restart the browser with these three pinned tabs and the one open tab, Task Manager will show that Mozilla Firefox is using around 1,500 MB of memory. But throughout the day, that number will just keep getting larger and larger. Before long it becomes 2,500 MB. Then 3,500 MB. Then 4,500 MB. Then 6,500 MB. Refreshing the tabs does not help much, if at all. The best way to free up the accumulated memory is to restart the browser, which I usually do at least once a day. If I don't restart the browser, I can only imagine the memory taken will just keep getting larger, like over 9,000 MB, etc.

Today, I did some searching online and found out about about:processes. When I opened up about:processes, I saw that the Amazon Order History pinned tab is using over 500 MB (was using 150 MB), a subframe on Amazon is using 420 MB (was using 85 MB). The Discord conversation pinneed tab is using over 530 MB (was using 275 MB). And the comic pinned tab is using 300 MB (was using 135 MB). The offline website open regular tab is only using 80 MB (was using 60 MB), so that's not bad. This is after around half a day. The numbers will just keep increasing throughout the day.

I am using the portable version of 123.0 (64-bit) that I got from Portable Apps. Hopefully, it being portable won't be the reason for these memory leaks. I wanted a portable browser because it gives me a better sense of security and I like how I can bring my browser with me if needed and still have all my extensions, extension settings, and chrome css settings.

I will consider doing a fresh install of the portable browser sometime this year and see if that will help, but it won't be for a while. Hopefully you can run some tests on your end and see if there are any memory leak issues.

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → WebExtensions

I did a fresh install of 124.0 (64-bit) just now. I didn't intend to. It was because the browser updated and then I got this message: "You've launched an older version of Firefox. Using an older version of Firefox can corrupt bookmarks and browsing history already saved to an existing Firefox profile. To protect your information, create a new profile for this installation of Firefox." So I did the clean install. But even after the clean install, I still go the same error message. I read online that I am supposed to delete the contents of the compatibility.ini in my profile folder, so I did that and that fixed the problem.

I doubt anything has changed though. I will probably still have memory leak problems. I'll try to report back later with updated information.

After the clean install, I went to bed. When I woke up, the Discord conversation pinned tab used 875 MB memory, the Amazon pinned tab used 970 MB, the Amazon subframe used 645 MB, and the comic pinned tab used 700 MB. The regular open tab that is my offline website only used 70 MB. I don't know if the problem is pinned tabs in general, or just any website that is not my offline website.

Component: Untriaged → DOM: Performance
OS: Unspecified → Windows 10
Product: WebExtensions → Core
Hardware: Unspecified → Desktop
Version: Firefox 123 → Firefox 124
Component: DOM: Performance → General
Component: General → Performance

This bug was moved into the Performance component.

:postandreply, could you make sure the following information is on this bug?

  • For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.
  • For memory usage issues, capture a memory dump from about:memory and attach it to this bug.
  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

If the requested information is already in the bug, please confirm it is recent.

Thank you.

Flags: needinfo?(postandreply)

(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #4)

I am not having an issue with Firefox using a lot of CPU or being abnormally slow, so I am not going to bother capturing and sharing a profile.

  • For memory usage issues, capture a memory dump from about:memory and attach it to this bug.

When I go to the about:memory page, there is no "capture memory dump" button. On the about:memory page, I see the following:

Show memory reports [Measure] [Load] [Load and diff...]
Save memory reports [Measure and save...]
Free memory [GC] [CC] [Minimize memory usage]
Save GC & CC logs [Save concise] [Save verbose]

Could you provide more detailed instructions on which of these buttons I should be clicking? If I had to guess, I am supposed to click the Save memory reports [Measure and save...] button which creates a memory-report.json. But I want to be sure before I attempt anything.

  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

Although I don't see the point in capturing a profile since I'm not having any issues with slowness or high CPU usage, I am guessing you still need the "Copy raw data to clipboard" information. But I will wait until you answer the question about what to click on the about:memory page before I proceed and share that file.

(In reply to gaveitatry from comment #5)

(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #4)

I am not having an issue with Firefox using a lot of CPU or being abnormally slow, so I am not going to bother capturing and sharing a profile.

This could still provide us some clue, so if you can record a short one when you start seeing the issue that would be lovely.

  • For memory usage issues, capture a memory dump from about:memory and attach it to this bug.

When I go to the about:memory page, there is no "capture memory dump" button. On the about:memory page, I see the following:

Show memory reports [Measure] [Load] [Load and diff...]
Save memory reports [Measure and save...]
Free memory [GC] [CC] [Minimize memory usage]
Save GC & CC logs [Save concise] [Save verbose]

Could you provide more detailed instructions on which of these buttons I should be clicking? If I had to guess, I am supposed to click the Save memory reports [Measure and save...] button which creates a memory-report.json. But I want to be sure before I attempt anything.

"Measure and save" is the right button indeed!
But we need you to do it only when you have the problem.

  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

Although I don't see the point in capturing a profile since I'm not having any issues with slowness or high CPU usage, I am guessing you still need the "Copy raw data to clipboard" information. But I will wait until you answer the question about what to click on the about:memory page before I proceed and share that file.

Yes, troubleshooting information is an essential piece to help with diagnosing an issue.

Thanks!

Performance Impact: --- → pending-needinfo

I found out that memory leak was caused by the AdGuard AdBlocker extension. The AdGuard AdBlocker for Chrome doesn't have this problem, but the of course the API and stuff is different for Mozilla Firefox and I guess there is a problem where it causes memory leaks in Firefox. I saw some threads with other people experiencing the same problem.

I know that this isn't the place to post this, but I've been using Firefox for around 15 years now. It's really well designed. There are things about it that existed 15 years ago that Chrome does not have. Like an excellent Bookmarks Sidebar built in. The ability to pin extensions to the left side of the browser window, not just the right. The ability to open up more than one Picture in Picture. The ability to make windows and PiPs smaller than in Chrome, but it's been a while so maybe only through userChrome.css. A nice Download button that shows download progress and the ability to open up a Bookmarks/History, etc window and easily clear History without having to dig around for Delete Browsing History. The list goes on. Firefox is highly customizable, more so than any other browser.

But I'm also really disappointed in Firefox too. Before Quantum came out, there was rounded tabs and loading icons in the tabs were circular. But with Quantum you made hideous changes to the UI with blue dots that bounce from left to right and block tabs and other stupid things. I used some GitHub code that makes Firefox look like Chrome with the rounded tabs and I restored the round loading icon. But I hate how I have to use a hack to get something that should be default standard UI. I bet anything that most all people who stopped using desktop Firefox was after Quantum came out because the UI stinks.

I also notice that Firefox is a bit of a memory hog. I usually only have two pinned tabs and an unpinned tab that is for my simple offline website. I always try to close tabs and only keep those three. But let's say I open up an extra one or two tabs. Like the Extensions page and a blank Google page. The memory usage will go up and be more than Chrome where in Chrome I will have like 10 tabs and be playing videos and doing other intensive stuff.

And for some reason, Firefox just feels outdated. It's probably my imagination. I can't really complain that the browser looks identical year after year for so many years, because after applying the userChrome hacks and making it look like Google Chrome, it's a pretty decent looking browser. It's just that I hate using these hacks. I'm tired of it. And I did the very best possible job to make a more minimal Bookmarks Sidebar where I moved the content up and to the left to hide a bunch of stuff and only be able to see bookmarks and nothing else. And the result is okay, but it just needs more polish. It looks old and tired. Even though Chrome is severely lacking and behind and restricted on a lot of things, it just feels fresher. I don't know why. Maybe it's because I've been brainwashed with the nonstop Google everything services. I don't know.

I don't know if I can make the switch to Chrome. But I'm seriously considering it. I'm in the process of transferring my important bookmarks and passwords and other settings and I'm going to see if I can get used to their limitations, restrictions, and poor design choices. I really feel like you made a huge mistake all those years ago when you changed the rounded tabs and round loading icons for that hideous Quantum UI. And the Bookmarks Sidebar is great but it could use more polish and better coding so we can hide stuff we don't want to see and have a more minimal - bookmarks and folders only view without having to resort to userChrome hacks that are limited and can only do so much.

I love Firefox. I really do. Some other things about it. I like the Firefox program icon a lot better. I like the Bookmarks Sidebar toolbar icon a lot better. But I feel like it is an expensive, rare, collectors edition of a house of cards. Whereas Chrome is super limited and restricted and has poor design choices but can at least be considered a stable log cabin that I don't have to put bandaids all over to make it presentable.

Flags: needinfo?(postandreply)

I forgot to mention that Chrome Password Manager lets me save notes for each password, which is nice. I wish it would go a step further and let us give websites a "nickname" because some website saved passwords are saved under a strange name that I don't recognize, but at least they have a notes section so I can put important information there and use it as reference later. And the limited Bookmark Sidebar extension on Chrome has a notes section for each bookmark. It won't be synced between devices, but it's still nice that the extension developer is trying to give us the ability to make notes when necessary which to me is a lot nicer than tags because I can't write decent notes using only tags. And maybe Firefox came up with this first but it feels like Chrome was the one who made the recently closed tabs and extension button that shows unpinned extensions. Even if Firefox came out with it first, Chrome really does a good job of creating the illusion that it was their idea and they implemented it first and Firefox is just late to the party. Both Chrome and Firefox could use some improvements on getting to the extension options page though. I feel like each extension has a differnet method to get to the options section and it requires too many clicks and digging through layers to get to them.

Blocks: 1923426

Removing perf impact flag and adding to memory investigation meta bu - please continue to provide additional details to help us remedy any possible issues

Performance Impact: pending-needinfo → ---

My update is that it largely had to do with Adguard Adblocker having a memory leak issue in Firefox but not in Chrome. I say largely because there might have been some minor leaking in other extensions, but far less than Adguard Adblocker. Anyway, I have already switched from Firefox to Chrome. I now only use Firefox as a backup browser since it can do things like have multiple Picture in Pictures, whereas Chrome can only have one.

Looks like the actual issue this bug was opened for was only present with an extension. Therefore resolving this bug.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Duplicate of this bug: 1893481
You need to log in before you can comment on or make changes to this bug.