Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

size of cookies and places .sqlite files in FF4

123 views
Skip to first unread message

EE

unread,
Mar 11, 2011, 4:07:23 PM3/11/11
to
I have just heard that the default starting file size of places.sqlite
in FF4 is 10 MB and the default for cookies.sqlite is 512 KB. This
seems extremely excessive to me. My current size for cookies.sqlite is
8 KB, and the size of places.sqlite is 596 KB for FF 3.6.15. Granted, I
do not keep months worth of history or allow favicons, and I default to
blocking cookies, but those sizes still seem extremely large. Why such
large starting sizes?

Robert Strong

unread,
Mar 11, 2011, 4:12:21 PM3/11/11
to dev-apps...@lists.mozilla.org
To lessen file fragmentation caused which degrades performance when
reading the databases.

> _______________________________________________
> dev-apps-firefox mailing list
> dev-apps...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-firefox

Ron Hunter

unread,
Mar 11, 2011, 9:01:15 PM3/11/11
to

My cookies.sqlite is 1meg.
My places.sqlite is 10meg.
But I have been using this profile for several months. Note that
places.sqlite also includes your bookmarks, as well as your history, and
favicons.

EE

unread,
Mar 12, 2011, 2:14:26 PM3/12/11
to
I know that places.sqlite stores bookmarks and history. I do not allow
favicons. I also do not keep my history very long. I am blocking most
cookies. I cannot see that I will ever need a cookie file that is 512
KB, or a places.sqlite file that is 10 MB in size. Is there any way to
change those default sizes? Where would that setting be?

Shawn Wilsher

unread,
Mar 12, 2011, 2:32:37 PM3/12/11
to dev-apps...@lists.mozilla.org
On 3/12/2011 11:14 AM, EE wrote:
> I know that places.sqlite stores bookmarks and history. I do not allow
> favicons. I also do not keep my history very long. I am blocking most
> cookies. I cannot see that I will ever need a cookie file that is 512
> KB, or a places.sqlite file that is 10 MB in size. Is there any way to
> change those default sizes? Where would that setting be?
There is no way to change that size, and at this time, I don't think
we'll want to support doing so.

Cheers,

Shawn

Justin Dolske

unread,
Mar 12, 2011, 3:04:01 PM3/12/11
to
On 3/11/11 1:07 PM, EE wrote:
> I have just heard that the default starting file size of places.sqlite
> in FF4 is 10 MB and the default for cookies.sqlite is 512 KB. This seems
> extremely excessive to me.

Sorry you feel that way. Can I make it up to you? NewEgg has 1TB drives
on sale for $55, that's 5e-9 cents per byte. By my math that's 5.2 cents
-- Ok, I'm generous, let's call it 6 cents -- of storage that we've not
optimized for you.

Send me your mailing address via email, and I'll get your nickel and
penny out to you ASAP. Seriously.

Justin

Ron Hunter

unread,
Mar 12, 2011, 5:09:07 PM3/12/11
to

Just wondering, with disk space so cheap, and most computers having more
HD space than I could fill in my lifetime, WHY are you concerned about
this? Seems a bit of a non-problem to me.

Boris Zbarsky

unread,
Mar 13, 2011, 12:09:03 PM3/13/11
to
On 3/12/11 3:04 PM, Justin Dolske wrote:
> Sorry you feel that way. Can I make it up to you? NewEgg has 1TB drives
> on sale for $55, that's 5e-9 cents per byte.

For what it's worth, some people are using systems with quotas, so
aren't in control of their own disk space.

I still think this is an edge case, and most quotas I've seen recenrly
are big enough (at least a gig) that 10MB is not a huge deal.

-Boris

David McRitchie

unread,
Mar 13, 2011, 2:31:36 PM3/13/11
to

"Boris Zbarsky" <bzba...@mit.edu> wrote in message news:2pCdncaTAfi9ceHQ...@mozilla.org...

> are big enough (at least a gig) that 10MB is not a huge deal. // Boris

Such quotas might also be important for those using Portable Firefox
or applications on a Flash drive, and mobile system without a hard drive.
Although I could carry a small 500 GB portable drive with my laptop, I think not.
Ten MB might not be a lot on my 136GB drive but I dare not use more than
half of or it will really slow down like my previous laptop. Larger hard drives
do not increase the number of heads or speed of the HD. USB 3 will help
though with external drives -- not looking to replace a laptop I just purchased last year.

I imagine in a developer's group that many people have more than one profile,
so now maybe that's 100MB -- don't know if that makes a difference or not.

EE

unread,
Mar 13, 2011, 3:10:46 PM3/13/11
to
Why? Setting incremental sizes that big is a waste of storage space.

EE

unread,
Mar 13, 2011, 3:14:16 PM3/13/11
to

Can a computer from 2004 or 2006 use that big a drive? Could Windows XP
or Mac OS 10.4.11 handle such a drive?

EE

unread,
Mar 13, 2011, 3:15:46 PM3/13/11
to

But why not make the increments 2 MB instead of 10? And for cookies,
why not make the increments 12K instead of 512?

Asa Dotzler

unread,
Mar 13, 2011, 3:36:26 PM3/13/11
to

PCs from September of 2002 and after running XP have no problem with a
1TB drive. You have to go back to Windows XP pre-SP1 to run into
computers with that ancient 137GB limitation (28-bit addressing) and
even there I'm pretty sure that the 48-bit LBA was available but simply
disabled by default and quite easy to turn on.

- A

Shawn Wilsher

unread,
Mar 13, 2011, 4:56:52 PM3/13/11
to dev-apps...@lists.mozilla.org
On 3/13/2011 12:15 PM, EE wrote:
> But why not make the increments 2 MB instead of 10? And for cookies, why
> not make the increments 12K instead of 512?
The only justification for this that you've given is that you think the
current sizes are too big. This isn't enough of a cost compared to the
benefits for us to change our decision.

Cheers,

Shawn

Ron Hunter

unread,
Mar 13, 2011, 9:28:59 PM3/13/11
to

I don't believe I have seen an ad for a HD with less that about 40GB in
a long time. What's 100MB to even 40GB, with most systems running much
larger drives. EVen on an 8GB flash drive, 100MB is pretty trivial.
Even to an old guy like me who started in computers when commercial ones
had only 4.8k (yes, that 4,8000 characters) of storage, I don't get
concerned about wasted space until it reaches the GB stage.
I am still waiting for the OP to explain WHY he is concerned with this
HD usage.

Ron Hunter

unread,
Mar 13, 2011, 9:29:40 PM3/13/11
to

WinXP can. Don't know about Mac.

Robert Strong

unread,
Mar 13, 2011, 11:15:33 PM3/13/11
to dev-apps...@lists.mozilla.org, jeff...@gmail.com
Sent from Jeff directly to me by mistake:

Jeff, I'm going to let someone on the places team answer your question

On Mar 11, 4:12 pm, Robert Strong<rstr...@mozilla.com> wrote:

> To lessen file fragmentation caused which degrades performance when
> reading the databases.
>

>> _______________________________________________
>> dev-apps-firefox mailing list
>> dev-apps-fire...@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-apps-firefox
This is really excessive in size, couldn't you make a new .sqlite file
just for the bookmarks toolbar? The reason why is that I'm a linux
desktop developer and when I include Firefox in a release I usually
change the bookmarks toolbar by adding a few links like simple mail,
facebook etc, but now its automatically 10MB when I do so. When really
it should just be a few KB. That would be very helpful, What I did
this time round is that I used an older FF 4 beta places.sqlite and
swapped it for the newer 10MB and it works fine, Right now after using
it a few times its only 288kb a far cry from 10MB.
jeff
Jeff


John Small

unread,
Mar 14, 2011, 6:45:19 AM3/14/11
to
On Sat, 12 Mar 2011 22:09:07 UTC, Ron Hunter <rphu...@charter.net>
wrote:

If he's like me, he is not so much concerned with HD space but as his
is with RAM usage.

Firefox 3.x/4.x use so much RAM that I find them unusable on my rather
old system. And since the sqlite files were introduced in Firefox 3.x
I wonder if there is a connection between their greatly increased size
(compared to the old bookmarks.html) and the dramatic increase in RAM
usage.

--

John Small

Ron Hunter

unread,
Mar 14, 2011, 7:05:37 AM3/14/11
to
RAM is 'dynamic'. All modern Operating Systems are 'virtual memory', so
how much physical ram you have is not as important as it once was. I
doubt that FF uses 10Meg of RAM if you read the places.sqlite file, and
it is really only 1M. If so, this could be fixed. It is a fact of
computer life that as programs become more powerful, they take more RAM.
I commonly run programs that take more RAM than I had HD space only 10
years ago!
It is still true that the best ROI for an upgrade you can get is to add
more RAM to your machine.

Shawn Wilsher

unread,
Mar 14, 2011, 1:28:44 PM3/14/11
to dev-apps...@lists.mozilla.org, Gervase Markham
> This is really excessive in size, couldn't you make a new .sqlite file
> just for the bookmarks toolbar? The reason why is that I'm a linux
> desktop developer and when I include Firefox in a release I usually
> change the bookmarks toolbar by adding a few links like simple mail,
> facebook etc, but now its automatically 10MB when I do so. When really
> it should just be a few KB. That would be very helpful, What I did
> this time round is that I used an older FF 4 beta places.sqlite and
> swapped it for the newer 10MB and it works fine, Right now after using
> it a few times its only 288kb a far cry from 10MB.
> jeff
> Jeff
There are other ways to set different default bookmarks (such as
changing bookmarks.html), but I'm unsure if changing the default
bookmarks is allowed (if you are still calling it Firefox without
permission from the Mozilla Foundation).

Cheers,

Shawn

Gervase Markham

unread,
Mar 14, 2011, 2:38:37 PM3/14/11
to Robert Strong, jeff...@gmail.com
On 14/03/11 03:15, Robert Strong wrote:
> This is really excessive in size, couldn't you make a new .sqlite file
> just for the bookmarks toolbar? The reason why is that I'm a linux
> desktop developer and when I include Firefox in a release I usually
> change the bookmarks toolbar by adding a few links like simple mail,
> facebook etc, but now its automatically 10MB when I do so. When really
> it should just be a few KB. That would be very helpful, What I did
> this time round is that I used an older FF 4 beta places.sqlite and
> swapped it for the newer 10MB and it works fine, Right now after using
> it a few times its only 288kb a far cry from 10MB.

Hi Jeff,

As Shawn says, if you are shipping something branded "Firefox" but
changing it, you need to have an agreement with us. Unless you have one
already, please contact part...@mozilla.com to work something out.

Thanks :-)

Gerv

Asa Dotzler

unread,
Mar 14, 2011, 5:13:33 PM3/14/11
to
On 3/14/2011 3:45 AM, John Small wrote:

> If he's like me, he is not so much concerned with HD space but as his
> is with RAM usage.

He is not like you and is not talking about RAM. Please don't hijack
this thread.

Thanks,
-A

EE

unread,
Mar 14, 2011, 5:32:26 PM3/14/11
to
At least there should be some option somewhere so one can change the size.

EE

unread,
Mar 14, 2011, 5:36:51 PM3/14/11
to
The bookmarks toolbar is part of the bookmarks. All of that stuff is in
places.sqlite.
Even if you start with 10 MB, I do not see why the next increment after
that would not be smaller. If you are just one byte over, the size goes
up 10 MB!

Robert Strong

unread,
Mar 14, 2011, 5:47:25 PM3/14/11
to dev-apps...@lists.mozilla.org
Because each subsequent increase would be by that smaller amount and
each increase will cause file fragmentation.

Robert

Shawn Wilsher

unread,
Mar 14, 2011, 6:22:55 PM3/14/11
to dev-apps...@lists.mozilla.org
On 3/14/2011 2:32 PM, EE wrote:
> At least there should be some option somewhere so one can change the size.
Not without justification.

Cheers,

Shawn

Millwood

unread,
Mar 14, 2011, 7:12:45 PM3/14/11
to
go to \windows

type

dir *.log /s

On my machine, I find 42meg of log files scattered about!

So why don't you go work on that problem - the payoff looks better.

Robert Strong

unread,
Mar 14, 2011, 8:52:43 PM3/14/11
to dev-apps...@lists.mozilla.org
We don't create any files in the Windows directory.

btw: the files in question are databases and not log files and although
databases do have transaction logs most of the log files under Windows
are not database transaction logs.

Ron Hunter

unread,
Mar 14, 2011, 9:23:58 PM3/14/11
to

AIUI, the intent is to minimize fragmentation of the places.sqlite and
cookies.sqlite files. Since this type of file becomes fragmented rather
quickly, and most users aren't prone to frequent defragmentation, they
are trying to prevent it from happening by managing the file from within
the program. This has a payback in speed of loading the program, and
general responsiveness. Seems worth 10MB to me.

Ron Hunter

unread,
Mar 14, 2011, 9:25:49 PM3/14/11
to

Then there is that swapfile, that grows and grows, when it really isn't
valid minutes after it is used, in most cases. Take a look at the Temp
file, for another place to save space.

Mike Beltzner

unread,
Mar 15, 2011, 10:58:50 AM3/15/11
to Ron Hunter, dev-apps...@lists.mozilla.org
As group moderator, I humbly suggest the worthwhile debate in this conversation may have ended some time ago.

cheers,
mike

EE

unread,
Mar 15, 2011, 2:22:39 PM3/15/11
to

And a huge increase will not do that? I thought FF4 was supposed to
have some kind of sqlite optimization built in anyway?

EE

unread,
Mar 15, 2011, 2:36:26 PM3/15/11
to

Okay, I just tried that. I found 974 K of log files. Most of those
were from Superantispyware.
What is the "/s" supposed to do?

EE

unread,
Mar 15, 2011, 2:38:46 PM3/15/11
to
Actually, I set a fixed size for my swapfile. It seems to make the
computer more efficient if there is always some space available and set
out already, and it is much better if the swap file is in one piece, and
not fragmented all over the place. I set up the swap file on partition
D right at the start of the partition so that it could not be fragmented.

Boris Zbarsky

unread,
Mar 15, 2011, 3:07:54 PM3/15/11
to
On 3/15/11 2:22 PM, EE wrote:
> And a huge increase will not do that?

That's correct. As long as you have lots of free space on your disk,
increasing a file size by 10MB will typically put the entire 10MB into a
single chunk on disk. Increasing the file size 10 times by 1MB is more
likely to give you 10 chunks.

-Boris

Rob Campbell

unread,
Mar 15, 2011, 3:10:47 PM3/15/11
to EE, dev-apps...@lists.mozilla.org
q.v., dir /?

> _______________________________________________
> dev-apps-firefox mailing list
> dev-apps...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-firefox

Millwood

unread,
Mar 15, 2011, 3:56:07 PM3/15/11
to
dir ... /s searches all subdirectories, and in the end shows the sum of
all the sizes.

Ron Hunter

unread,
Mar 15, 2011, 4:39:50 PM3/15/11
to

So, you did exactly what the development team did with the .sqlite
files, and for the same reason.

EE

unread,
Mar 16, 2011, 1:10:01 PM3/16/11
to

If that is still part of the same file, I do not follow your reasoning.
If I keep my boot partition (where the profile is) defragmented, how
would I end up with 10 chunks? If the size increased beyond 10 MB, then
another 10 MB chunk would be added, so there would be two chunks, or are
you saying that there is something magical about 10 MB pieces that makes
them stick together?

Boris Zbarsky

unread,
Mar 16, 2011, 1:34:42 PM3/16/11
to
On 3/16/11 1:10 PM, EE wrote:
> If I keep my boot partition (where the profile is) defragmented

Then you're a very very rare user.

Most users don't do that. And if they don't, then allocating a bit at a
time will end up fragmenting the file.

If you defragment the profile then all of this doesn't matter anyway,
because your sqlite file will just be one chunk, right?

-Boris

EE

unread,
Mar 17, 2011, 12:59:27 PM3/17/11
to
Except that I would have a lot of wasted unused space in there!
0 new messages