Confusion regarding the size of 'places.sqlite' file

Discussion of general topics about Mozilla Firefox
User avatar
satyr
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Confusion regarding the size of 'places.sqlite' file

Post by satyr »

Hello all, after noticing that the "places.sqlite" file is quite big in case of one of my profiles, I've decided to delete a few (well, quite a few) not-really-needed bookmark entries since I thought that this will make it smaller as was in case of FF 2.x's "bookmarks.html" files ...

Namely, after deleting them the "bookmarks-2008-09-22.json" backup file is much smaller (i.e. size reduced from 250 kB to 175 kB), while it's pretty much the same in case of exported "bookmarks.html" file (size reduced from 550 kB to approx. 350 kB), however, the size of "places.sqlite" is still 2.5 MB afterwards!!

Now, I viewed it (i.e. the "places.sqlite" file) in a file-viewer and I've seen that it doesn't contain only bookmark entries (but I guess also history and such), and so I've cleaned the Browsing and Saved form and Search History, but again, the size remained the same.

Therefore I am curious: is there any way to reduce the size, or the file in question will only get bigger the longer I use Firefox??!

Thanks for any reply, satyr
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.
User avatar
Bluefang
Posts: 7857
Joined: August 10th, 2005, 2:55 pm
Location: Vermont
Contact:

Re: Confusion regarding the size of 'places.sqlite' file

Post by Bluefang »

I'm not sure what Firefox's policy for this is... But it looks like the data is getting removed from the database, but it is not freeing the now unused space from the file. This is not too surprising because adding space to a database is not a trivial matter. Also, it's reasonable to assume that if the database got that large, it would like grow to that size again.

It's also possible that Firefox only cleans out the free space occasionally... But if you want tt now, any SQLite administration tool kit will allow you to compact the database. Just be sure that you close Firefox completely before you do that.
http://sourceforge.net/project/showfile ... e_id=91778 ( http://sqlitebrowser.sourceforge.net/ )
There have always been ghosts in the machine... random segments of code that have grouped together to form unexpected protocols. Unanticipated, these free radicals engender questions of free will, creativity, and even the nature of what we might call the soul...
VanillaMozilla
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Re: Confusion regarding the size of 'places.sqlite' file

Post by VanillaMozilla »

Don't worry about 2.5 MB. It's possible to "vacuum" the file, but it's not worth it. You can spend weeks on this sort of thing and not even make a dent. But the computer can handle the file in a blink.
User avatar
satyr
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Re: Confusion regarding the size of 'places.sqlite' file

Post by satyr »

Hey, thank you both for your very informative replies!! I will try that program from SourceForge ...

satyr
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.
VanillaMozilla
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Re: Confusion regarding the size of 'places.sqlite' file

Post by VanillaMozilla »

You never did tell us why you want to do this. If you're doing it just to change a number, it seems odd, especially considering that it's just going to get into the same state again.

So let us know if you actually have a problem and you achieve any perceived benefit.
User avatar
satyr
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Re: Confusion regarding the size of 'places.sqlite' file

Post by satyr »

VanillaMozilla wrote:You never did tell us why you want to do this. If you're doing it just to change a number, it seems odd, especially considering that it's just going to get into the same state again.


Yeah, you could say that (if by number you mean the megabytes), I mean I like things being tidy, and so I expected that after deleting quite a few not-really-needed bookmark entries (for which I assumed they're causing a delay on startup, even if a totally non-noticable one) the size of "places.sqlite" file would schrink ...

satyr
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: Confusion regarding the size of 'places.sqlite' file

Post by RobertJ »

My places.sqlite file is 12MB which is typical from what I've seen. Note that it also stores the favicon images as BLOB's.

Just an aside, my Grandfather was born in Slovenia.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
satyr
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Re: Confusion regarding the size of 'places.sqlite' file

Post by satyr »

I am just reporting back that SQLite Database Browser program reduced the size of "places.sqlite" file in case of one of my profiles from 2540 to 612 kilo-bytes!!

And further, as I mentioned that as it was in case of FF 2.x's "bookmarks.html" files, the file's size has become smaller even if making minor changes (i.e. not deleting bookmark entries), like for instance when I changed some bookmark entry's title from e.g. "Dr. Philip Zimbardo Standford Experiment - Google Search" to just "Experiment", and/or when deleting the entry's "Description" meta data (now visible in the Library if you click on "More")

Oh and by the way, it's interesting to hear that, RobertJ.

satyr
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: Confusion regarding the size of 'places.sqlite' file

Post by dickvl »

It is safer to export the bookmarks to a HTML file and maybe also to create a JSON backup and just delete places.sqlite.
Firefox will create a new places.sqlite and use the latest JSON backup in the bookmarkbackups folder to rebuild the bookmarks.
In case of missing bookmarks then you can either restore the JSON backup that you created or import the HTML backup and copy the missing bookmarks. You may have to reset the browser.places.*folderId prefs on the about:config page or better remove the lines if the values are not -1 from prefs.js in the profile folder.
See Bookmarks_not_Saved (MozillaZine KB)
User avatar
satyr
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Re: Confusion regarding the size of 'places.sqlite' file

Post by satyr »

VanillaMozilla wrote:Don't worry about 2.5 MB. It's possible to "vacuum" the file, but it's not worth it. You can spend weeks on this sort of thing and not even make a dent. But the computer can handle the file in a blink.


Actually, it takes only a few seconds, and I do it only once per month or even less often!!
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: Confusion regarding the size of 'places.sqlite' file

Post by Anonymosity »

My places.sqlite file is 692 KB in size. I do not use favicons, which really bloat the size of the file. If you were to delete places.sqlite (with Firefox closed), then open Firefox and have it restore the bookmarks from the backups (which it should do automatically), it should decrease the size of the places file.
VanillaMozilla
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Re: Confusion regarding the size of 'places.sqlite' file

Post by VanillaMozilla »

satyr wrote:Actually, it takes only a few seconds, and I do it only once per month or even less often!!

If it helps, fine. But if you count time spent on figuring out how to do it, remembering to do it regularly, and repeating that kind of effort for the hundreds or thousands of little problems on your computer, you might find that it wastes a lot of time. For most people I'd suggest instead that you just go outside and find a quiet place to take a walk.
User avatar
satyr
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Re: Confusion regarding the size of 'places.sqlite' file

Post by satyr »

VanillaMozilla wrote:
satyr wrote:Actually, it takes only a few seconds, and I do it only once per month or even less often!!

If it helps, fine. But if you count time spent on figuring out how to do it, remembering to do it regularly, and repeating that kind of effort for the hundreds or thousands of little problems on your computer, you might find that it wastes a lot of time. For most people I'd suggest instead that you just go outside and find a quiet place to take a walk.


Well, thank you for your concern - :lol:, but actually I am outside (be it on a walk with a dog etc.) everyday much more time that I spend behind the computer. However, it's true that I do (like to) deal with such things with a some strange passion!!
If you want to, please check out my site: tadej-ivan.50webs.com, and enjoy reading my computing-related discoveries, hints, principles, and rules.
1ajs
Posts: 1
Joined: August 26th, 2009, 10:26 pm

Re: Confusion regarding the size of 'places.sqlite' file

Post by 1ajs »

the info here has helped a bit as i have stumbled upone this file trying to clean up some hdd space as i am down to under 200 megs on my laptop here... and noticed this file is 304 megs :? quick google came up with this thread
i'm guna run that program and see if it can shrink this file down for me
Image
Anonymosity
Posts: 8779
Joined: May 7th, 2007, 12:07 pm

Re: Confusion regarding the size of 'places.sqlite' file

Post by Anonymosity »

If you want your places.sqlite to remain fairly small, block favicons and site icons.
Post Reply