I've noticed that the browscap table has grown rather large, up to 32 MB at this point. Is this correct behavior? Will it continue to grow? Can it be emptied or reset?

Comments

AohRveTPV’s picture

Is this correct behavior?

Seems correct. The source browscap.ini file at http://browscap.org for the browser information is currently ~6.5MB. Serializing that data and storing it in the database adds overhead. My MySQL table on a site where I just installed Browscap looks to be about 40MB.

Will it continue to grow?

Probably, yes. New browser information should be added to the browscap.ini at http://browscap.org as new browsers are released.

The growth is not due to stale data accumulating in the Drupal database. Every time a new browscap.ini is imported the old information is overwritten.

Can it be emptied or reset?

You can empty it but it will just become the same size the next time the data is downloaded.

If you really want to reduce its size, you could try changing import.inc to use the "lite" browscap.ini file instead of the default, which should reduce the size by about 1/3. I haven't tested it but it is probably just a matter of changing the URL http://browscap.org/stream?q=PHP_BrowsCapINI to http://browscap.org/stream?q=Lite_PHP_BrowsCapINI.

Note that the browscap.ini downloads have been broken for a few months due to #2171549: Can't dowload last Browscap.ini RC from http://browscap.org/.

greggles’s picture

Status: Active » Fixed

I think comment #1 answers the questions here rather well. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.