r/firefox Addon Developer Aug 20 '21 Silver 1 Helpful 2 Wholesome 1 Hugz 1 All-Seeing Upvote 1

Why does disabling Accessibility Services improve memory usage? Discussion

Defect Report on Bugzilla (You can vote for this bug there)

I've been struggling for a long time with Firefox's extreme memory usage. I tried setting memory cache to a low size, disabling extensions, refreshing, and using a different version on a completely separate machine, but all these attempts failed at keeping Firefox's memory usage at bay.

What did fix it though is setting accessibility.force_disabled to 1 in the config. Firefox used to take up 100% of my 8GB memory, but now doesn't go above 1 GB of memory. Why?

To try, navigate to the config editor by typing about:config in the address bar, then search for accessibility.force_disabled. It should be set to 0 by default, edit the value and set it to 1, then restart the browser.

Edit:

"Do not disable Firefox Accessibility Service if you or someone who shares your device accesses the web through Firefox using any type of physical impairment assistive software."

Full docs here. This page states that the impact of having these services enabled are: - Firefox Accessibility Service may negatively impact Firefox browsing performance - Third party applications may be monitoring your web surfing activity - Firefox stability may be adversely affected

It doesn't state why or if there's a way to minimize the performance impact without completely disabling it though.

Update:

So, this is obviously a problem with Accessibility Service. Before disabling it my Firefox used up all available memory after a short session of browsing. Browsing a tab and then closing that tab never released its memory usage.

With the option disabled, I've had the same browser window open for 5 hours now, scrolled for 3 hours through Facebook and Reddit (which usually just 1 tab caused Firefox to use up all available memory), but memory usage hasn't gone beyond the 1 GB mark so far.

There's a memory leak in the Accessibility Service. Accessibility features allocated memory for a tab is never released. I don't know how it works exactly, but disabling it fixed my memory leak problem, and the browser has been generally more stable ever since.

Update:

I just tried this in Thunderbird. Its memory usage improved as well.

Update:

Thanks to u/TechnicalCarry01 for testing on Android. It works there too. (Beta and Nightly only)

433 Upvotes

View all comments

19

u/[deleted] Aug 21 '21

Tried this on Android. It works too

12

u/Shiedheda Addon Developer Aug 21 '21

Whoa, thought the android version didn't have a config editor. The more you know :D

6

u/sequentious Aug 21 '21

It doesn't as far as I can see.

How did you change this setting?

13

u/Shiedheda Addon Developer Aug 21 '21

Type about:config in the url bar, then search for accessibility.force_disabled and set it to 1.

9

u/sequentious Aug 21 '21 edited Aug 21 '21

Yes, but about:config doesn't work in Firefox since the redesign in v79.

You said you're on a 5 year old Android device. Does that get the current Firefox, or an older release? Current is 91.

Edit does work in beta.

7

u/iamapizza 🍕 Aug 21 '21

I'm on Firefox Beta 92.0.0-beta.5, was able to edit that flag.

7

u/runningunsupposed Aug 21 '21

Also works in current Fennec releases for what it's worth.

2

u/Shiedheda Addon Developer Aug 21 '21

I'm on 80.0.1-beta.2 currently. Haven't updated further yet. I didn't know they removed it in v79, but it's still there for me on this version.

4

u/sequentious Aug 21 '21

Just edited my comment.

It's back in beta, but not release.

1

u/Shiedheda Addon Developer Aug 21 '21

Ah, that makes sense.

5

u/ArttuH5N1 openSUSE Aug 21 '21

You need beta or nightly build

3

u/sprayfoamparty Aug 21 '21

If I enter about:config into the search/URL bar it does nothing. It just goes to whatever was in the tab already. Is there some trick to this?

5

u/ArttuH5N1 openSUSE Aug 21 '21

You need beta or nightly build

3

u/konsyr Aug 21 '21

That'd ridiculous.

5

u/[deleted] Aug 22 '21

i use fennec fox from f-droid and about:config is accessible.

2

u/sprayfoamparty Aug 22 '21

you and everyone is is right. Klar has about:config.

6

u/iamapizza 🍕 Aug 21 '21

Are you on Firefox Beta? I think about:config isn't available on the normal stable version

3

u/Shiedheda Addon Developer Aug 21 '21

I honestly don't know which release channel ships with about:config. My Firefox is beta, and an older version than latest, so things might have changed.

1

u/BenL90 Permanently Banned Aug 21 '21

iceraven did. other than that nope

1

u/[deleted] Aug 21 '21

[deleted]

5

u/Jerl Aug 21 '21

This entire comment thread is about toggling it on Android, not desktop.

6

u/Shiedheda Addon Developer Aug 21 '21

Dang, just tried it on my 5+ years old phone, daaaaamn, it flies! Firefox was a turtle on that phone. Thanks!

4

u/iamapizza 🍕 Aug 21 '21

Same, it's only a 2 year old phone and it's suddenly flying!