MozillaZine

Confusion regarding the size of 'places.sqlite' file

Discussion of general topics about Mozilla Firefox
satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted September 22nd, 2008, 3:51 pm

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.

Bluefang

User avatar
 
Posts: 7856
Joined: August 10th, 2005, 2:55 pm
Location: Vermont

Post Posted September 22nd, 2008, 5:25 pm

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

Post Posted September 23rd, 2008, 6:31 am

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.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted September 23rd, 2008, 10:40 am

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

Post Posted September 23rd, 2008, 11:09 am

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.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted September 23rd, 2008, 1:34 pm

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

RobertJ
Moderator

User avatar
 
Posts: 9838
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post Posted September 24th, 2008, 10:24 am

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.

.
SeaMonkey 2.46 - FF 52.0 - TB 45.8 - Mac OSX 10.12.3 Quad-Core Intel Xeon 5500
Computers I've used: IBM 7094/UNIVAC 1108/IBM 360/DEC PDP11/DEC VAX-11 780/DEC VAXstation 8000/Sun SPARCstation 2/Mac from 1984 to 2017

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted September 27th, 2008, 9:48 am

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

dickvl

User avatar
 
Posts: 51855
Joined: July 18th, 2005, 3:25 am

Post Posted September 27th, 2008, 11:40 am

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)

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted June 24th, 2009, 4:33 pm

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: 8384
Joined: May 7th, 2007, 12:07 pm

Post Posted June 25th, 2009, 2:43 pm

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

Post Posted June 25th, 2009, 3:21 pm

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.

satyr

User avatar
 
Posts: 312
Joined: July 13th, 2004, 2:00 pm
Location: Ljubljana, Slovenia, Europe

Post Posted August 4th, 2009, 1:41 pm

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

Post Posted August 26th, 2009, 10:38 pm

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: 8384
Joined: May 7th, 2007, 12:07 pm

Post Posted August 27th, 2009, 11:41 am

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

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 2 guests