X
Tap here to go to the mobile version of the site.

Support Forum

Why does Firefox on Android use so much space and fill up the volume? (App: 24MB. Data: 30MB+)

Posted

Summary:

Firefox is using too much space on my Android phone and this is causing problems on my phone such as "Low on space" errors. Android applications are unable to receive security updates due to Firefox's high space utilization, which is a security problem.

Why does Firefox use so much space and how can I prevent or resolve this problem?

Details:

I am running Firefox 18.0 on Android 2.3.4. I moved Firefox to my 8GB SD Card. This problem happens in Firefox 19 & Firefox 20 as well.

Firefox is using a huge amount of space. It is the largest application on my phone by a long shot. It seems that Firefox will grow without bounds until it triggers a "Low on space" warning on the Android device. When this "Low on space" warning is reached, Firefox becomes unstable, and I am unable to install other Android applications. Often applications are unable to update themselves due to Firefox's high space utilization, and cannot receive security updates which is a security problem.

Please see the following screenshot which shows that Firefox is using about 30MB worth of space, and is about twice as large as the next largest App, Google Maps.

https://www.dropbox.com/sh/7di3oh1p98bh68v/AoxNuqMKd4/2013.01.20-16.17.40.jpeg

If I go to "Settings: Applications: Storage Use: Firefox", Android tells me that Firefox is using the following amount of space:

   Storage:
   Total: 29.60Mb
   Application: 1.85MB
   Data: 27.76MB
   Cache: 0.00B

When Firefox is freshly installed, the "Total:" use is closer to 3MB. But within a few days, this number grows to 30MB.

Why does Firefox use so much space and how can I prevent or resolve this problem?

Modified by stefanlasiewski

Chosen solution

by stefanlasiewski

I have a more detailed analysis of the problem. I believe this is a bug in Firefox, and I will file a bug report later. Look below for my temporary workaround.

Firefox has a feature known as a "Smart cache". I cannot find much information about this cache, but the name suggests that the size of the "Smart cache" is determined automatically.

To see the value of your cache, browse to "about:cache" and note the values. For me, "Maximum storage size" is currently 256000 KiB (Yes -- 200MiB). This value is equal to the value of browser.cache.disk.capacity, which was modified by Firefox from it's default value of 20480.

   Disk cache device
   Number of entries:     321
   Maximum storage size:     256000 KiB
   Storage in use:     2561 KiB
   Cache Directory:     /data/data/org.mozilla.firefox/files/mozilla/removed.default/Cache
   List Cache Entries

My workaround

Here is my temporary workaround to adjust the size of the cache. I am experimenting with these settings, but I feel these settings are okay for my low-end Android phone.

Go to 'about:cache', search for 'cache' and then change the following values

  1. Disable the smart cache:
   browser.cache.disk.smart_size.enabled=false
  1. Set the disk cache to a small value. This might be too small in the eyes of some developers, and I am open to better values. The default is 20480 (20M) which is way too large for my phone.
   browser.cache.disk.capacity=2048
  1. Cache compression is disabled by default. Turn it on, and set compression to a reasonable level (1-9, where 1 is low CPU usage but low compression, and 9 is high CPU usage and high compression).
   browser.cache.compression_level=6

Verify

1. Browse to 'about:cache' and note that the new value for ' Maximum storage size' is 2048.

Read this answer in context 6
Post a Reply

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:18.0) Gecko/20100101 Firefox/18.0

More Information

kbrosnan
  • Top 25 Contributor
  • Moderator
174 solutions 1300 answers
Posted

Firefox for Android is a full replacement for a browser. It is a similar size to the Chrome browser available for ICS+. Thirty megs is about the minimum that Firefox will use.

Was this helpful to you? 3
Reply
Posted

Question owner

When I install Firefox and move it to the SD card, the app only uses a few Megabytes worth of space (See the screenshot above to show the space, according to Android). Firefox functions fine. But eventually Firefox grows to be much larger.

Modified by stefanlasiewski

Was this helpful to you? 0
Reply
kbrosnan
  • Top 25 Contributor
  • Moderator
174 solutions 1300 answers
Posted

The installer is approximately 20 megs. There is no way for Firefox to use less than that.

Was this helpful to you? 0
Reply
OlafLarry 0 solutions 3 answers
Posted

Stefan have you moved yor FF to SD card? Application takes very little of space but data takes a lot. I`ve got similar problem - 32 MB of data - my Sync account takes 6,6....

Was this helpful to you? 1
Reply
Posted

Question owner

Yes, I have moved Firefox to the SD card. According to Android, Firefox only uses 1.85MB on the main system storage.

      Application: 1.85MB

I'll update my question to state that Firefox has been moved to the SD card.

Was this helpful to you? 1
Reply
Posted

Question owner

> The installer is approximately 20 megs

But note that according to Android, Firefox only uses 1.85MB on my system:

      Application: 1.85MB
      Data: 27.76MB

I should clarify that I moved Firefox to the SD card. The bulk of the 20MB application lives on the SD card. But Data grows from a few MB to 30+ MB within a few days.

Modified by stefanlasiewski

Was this helpful to you? 1
Reply
OlafLarry 0 solutions 3 answers
Posted

That's what i thought Stefan. I cannot move my apps to SD, so now i`ve got firefox with ober 80 MBs on my phones memory!

So i`ve check it and i found something interesting: Folder /data/data/org.mozilla.firefox/files/mozilla/wl5xm96h.defult/Cache takes 43.31 MB! So why cache folder takes 43MB??

Was this helpful to you? 1
Reply
Posted

Question owner

Olaf, I have come to the same conclusions. The Cache is at fault here.

The four largest directories under /data/data/org.mozilla.firefox are:

   1MB    	./files/mozilla/$uniqueid.default/indexedDB/chrome
   1MB    	./files/mozilla/$uniqueid.default/indexedDB
   3MB    	./files/mozilla/$uniqueid.default/safebrowsing
   5-30MB	./files/mozilla/$uniqueid.default/Cache

(Note that I obfuscated my unique identifier)

I've been reading up on the Cache settings (browse to about:config and search for 'cache'), but some of those settings are not well documented.

Also note that Android's "Clear Cache" does not work with the Firefox cache.

Modified by stefanlasiewski

Was this helpful to you? 1
Reply
Posted

Chosen Solution

I have a more detailed analysis of the problem. I believe this is a bug in Firefox, and I will file a bug report later. Look below for my temporary workaround.

Firefox has a feature known as a "Smart cache". I cannot find much information about this cache, but the name suggests that the size of the "Smart cache" is determined automatically.

To see the value of your cache, browse to "about:cache" and note the values. For me, "Maximum storage size" is currently 256000 KiB (Yes -- 200MiB). This value is equal to the value of browser.cache.disk.capacity, which was modified by Firefox from it's default value of 20480.

   Disk cache device
   Number of entries:     321
   Maximum storage size:     256000 KiB
   Storage in use:     2561 KiB
   Cache Directory:     /data/data/org.mozilla.firefox/files/mozilla/removed.default/Cache
   List Cache Entries

My workaround

Here is my temporary workaround to adjust the size of the cache. I am experimenting with these settings, but I feel these settings are okay for my low-end Android phone.

Go to 'about:cache', search for 'cache' and then change the following values

  1. Disable the smart cache:
   browser.cache.disk.smart_size.enabled=false
  1. Set the disk cache to a small value. This might be too small in the eyes of some developers, and I am open to better values. The default is 20480 (20M) which is way too large for my phone.
   browser.cache.disk.capacity=2048
  1. Cache compression is disabled by default. Turn it on, and set compression to a reasonable level (1-9, where 1 is low CPU usage but low compression, and 9 is high CPU usage and high compression).
   browser.cache.compression_level=6

Verify

1. Browse to 'about:cache' and note that the new value for ' Maximum storage size' is 2048.

Was this helpful to you? 6
Reply
Posted

Question owner

Another culprit is webappsstore.sqlite*, which on my phone uses 10MB worth of space. See below (I included the 5 largest subdirectories for comparison).

   # pwd
   /data/data/org.mozilla.firefox/files/mozilla/foo.default
   # du -ks * | sort -n
   ...
   1049    startupCache
   3549    safebrowsing
   4096    webappsstore.sqlite
   6072    adblockplus
   6149    webappsstore.sqlite-wal 
   #
   # du -ks /data/data/org.mozilla.firefox/files/mozilla*
   34777   /data/data/org.mozilla.firefox/files/mozilla

This is marked as a bug, but I don't know if there is any workaround or solution for this.

https://bugzilla.mozilla.org/show_bug.cgi?id=857888

Modified by stefanlasiewski

Was this helpful to you? 0
Reply
Posted

Question owner

And, if I move Firefox from the SD Card back to the Phone memory, Firefox 20 uses 62MB of space:

Here are two screenshots:

https://www.dropbox.com/s/qzecjr93z67zpw1/shot_000003.png https://www.dropbox.com/s/d6731nvgh3wueyj/shot_000004.png

Was this helpful to you? 0
Reply
dedi2s 0 solutions 1 answers
Posted

I was regularly Firefox's Clear Data and Cache from the Application manager. Since Link2SD won't move the data files to sdcard, I had to do it manually. but first the device must be rooted and busybox is installed on the device.

now I moved the files and cache directory from /data/data/org.mozilla.firefox to my sdcard's second partition. The /data/data/org.mozilla.firefox directory now has less than 2 MB, and it is stable in that size

Was this helpful to you? 0
Reply

Post a Reply

You must log in to your account to reply to posts.

Don't have an account? You can create a free account now.