[1+1=2]

OneAndOneIs2

« Getting into DrupalIs this a question? »

Tue, Feb 09, 2010

[Icon][Icon]Dude.. where's my bookmarks file?

• Post categories: Omni, FOSS, Technology, My Life

So following my last post on how Firefox has been annoying me by being buggy lately, I came across something I didn't know about FF version 3 that I thought was worth commenting on.

Because of a misbehaving extension, Tina lost all her bookmarks. In the hopes of restoring them, I took a look at her profile, and didn't see the expected plain-text bookmarks file. But I *did* discover a directory called "bookmarksbackup"

It turns out that FF saves backups of all bookmarks on a daily basis. About a week's worth. So you can always go into the bookmarks manager and restore your bookmarks from yesterday, or the day before, or the day before that..

And that was handy, and something worth knowing, and I was quite impressed, since that never used to be a feature - if you lost your bookmarks, you lost your bookmarks.

But what I found even *more* noteworthy was that, when I was looking for where Firefox stores bookmarks now, I found that it was stored in a file named places.sqlite

Yep.. as of version 3, they stopped using a plain-text file for bookmarks, and shunted them into a database instead. And not just bookmarks: Browser history, favicons, and even input history - when you type something into the awesomebar, it makes note of it for future use.

You might think it's a bit pointless, putting bookmarks into a database - who has THAT many bookmarks?? And I'd tend to agree if that were all they'd done.

But putting HISTORY into a database.. that I can understand. I keep quite a long history (90 days) and I visit quite a lot of websites. So there's a *lot* of data. And when you think about it, your browser needs to be able to check through your history *every time* it loads a web page: Many pages render links differently depending on whether or not you've visited them.

So a history database makes perfect sense: It can be big enough to justify it, and it needs to be FAST for a page to be loaded and displayed quickly.

And if you've got a database anyway, you might as well shunt as much stuff as you can into it. Like bookmarks.

Like so many things, this is one of those features that's completely invisible to the end user: I'm on version 3.5.7 and I only just discovered that FF has been using a database for history & bookmarks since 3.0.0 today.

But the combination of FF keeping bookmark backups; and the fact that it uses a database instead of plain text for all this stuff; I was impressed by. It's two very good ways of doing things, that probably took a lot of work on Mozilla's part and yet would have gone completely unnoticed by 99% of their users. So kudos to them for that. I'm impressed.

4 comments

Christophe
Comment from: Christophe [Visitor] · http://christophoronomicon.blogspot.com/
You didn't know Firefox had switched to SQLite for bookmarks since 3.0? That was actually somewhat of an unpopular decision, and debates for and against it were raging at that time across the web. People were saying that Firefox was doomed, and would lose integrity and stability by tying itself so close to a database. And indeed, for a while, until 3.5, Firefox suffered various performance issues that were all down to bugs in the SQLite implementation used. The worst were on Linux, where Firefox 3.0 up to 3.2 often froze completely for extended amounts of time because of the way the database interacted with the Ext3 filesystem. I know I suffered those slowdowns, and was not really happy about them.

But in any case, if it wasn't with a database, how else did you think AwesomeBar was implemented? The very goal of AwesomeBar was what obliged the Firefox team to start using a database rather than simple plain files. It just wasn't performing without one.

As for the backup system, it's true that it's kind of a secret thing. I discovered it when I started wondering why my .firefox folder was getting so big. You see, I have something like 1100 bookmarks (including the Live Bookmarks, since I use Firefox as a RSS reader too), so along with the history it makes the places.sqlite database quite big (about 12MB).

If you look further, you'll discover that Firefox nowadays puts nearly everything in databases. Saved passwords (in encrypted databases which are also backed up), cookies (!), download info (who's gonna search that?!) and form history. And extensions may have their own databases as well. All of it makes it very powerful, but sometimes I wonder if they didn't go *too* far.
09/02/10 @ 12:46
oneandoneis2
Comment from: oneandoneis2 [Member] · http://geekblog.oneandoneis2.org/
Well, no - FF3 came out in June 2008, which was when I went backpacking around Europe. Keeping up with tech news wasn't my highest priority!

As for the awesomebar - I didn't really think about it all that much, to be honest, but the amount of RAM Firefox has been using up in the last few years, I'd assumed it just loaded everything into memory on startup! :o)
09/02/10 @ 13:23
tuxdev
Comment from: tuxdev [Visitor]
The interesting thing that FF is using databases.. is that it now those databases need occasional maintenance. I run a little script that I got from github called "ffvacuum" to do that. FF is noticeably snappier for a while after a vacuum.
13/02/10 @ 06:47
Mike W
Comment from: Mike W [Visitor]
I just did some research on the FF ad-ons.

It seems that SQLite automatically re-indexes itself and FF V3.6 includes an automatic "vacuum" function!
13/02/10 @ 17:22

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)
 

[icon] Blogroll

[icon] Creative Hedgehog
Colmena colmena. (Quizá del celta *kolm?n?, der. de *k?lmos, paja; cf. bretón kôlôen-wénan, de kôlô, paja, y wénan, abejas). 1. f. Habitación natural de las abejas. 2. f. Enjambre que vive en la colmena. 3. f. Recipiente construido para habitáculo de las abejas. 4. f. Lugar o edificio en el que vive mucha gente apiñada. [...][Link to post]28/07/10 - SPN3730 vocabulario 2

[icon] Hari's corner
A few of my faves - please comment if you find them interesting[Link to post]24/07/10 - Photos I've taken - my favourites

[icon] Place of Stuff
Joseph&#8216;s story continues&#8230; Ten of his eleven brothers travel to Egypt to buy food to get them through the famine. Incidentally, something has occurred to me: in the tales of Joseph, God seems to be more bothered by getting Joseph into a position of power than in either preventing/alleviating the famine or in making the Israelites get [...]

[Link to post]
24/07/10 - The Bible ? Joseph is an Evil Genius

[icon] Advice From a Single Girl

So Friday (last) started out so well, I knew it was going to be an awesome day.

I slept in (ahhh, bliss) and went for a morning walk to mail some....er...mail (because, seriously, what else can you mail? turtles?) and it was sunny and warm and I hadn't had any caffeine yet so I got myself a Slurpee. Nothing says awesome Summer day like a 10 am Coke Slurpee cooling you down in the sun.

But do you know what really tipped the morning into full-blown awesomeness? The two shirtless, amazingly hot guys who jogged past me, sweaty and gorgeous as I walked home. Ahhhhh, sugar, sun, and sexy, my own personal Summer trifecta.

I went over to where C-Dawg was staying and picked her up (so there would be no driving necessary) and we came back to my apartment, poured ourselves a summer-worthy drink and headed out on the town.

We wandered through downtown, people watching and talking and laughing and window shopping and then we headed to one of the local patios and ordered up a pitcher and some appetizers.

And that's when the real fun began.

You see, C-Dawg and I love people watching. And more than that, we love making up little stories about people and trying to guess who they are. We'd soon discovered that Friday would have to be known as "Everyone Looks Familiar Day" because I kept on seeing people that I thought looked familiar but I couldn't tell if they actually were or if I was just imagining it.

We decided that the couple next to us had just boated in on their yacht and that the guys across from us were all discussing their volleyball league's last game.

We also tried to narrow down which men C felt were too young for me and which she deemed "just right." Once we'd narrowed my age-group down to a ten year span she tested me to see if I could actually tell which guys were ok and which were in the "are you crazy, he's way too young" category.

I did not do well at this. (sigh)

As the pitcher got emptied, a table behind us became filled with a bunch of guys. C-Dawg, needing to "get out of the sun" (which we're pretty sure the guys could tell was an obvious ploy for her to be able to stare at the guys instead of having to pretend to look around and can I just say thank goodness for sunglasses and how easy they make it to check out cute guys?) sat next to me and we started to figure out the back story for these guys.

Later, C decided to choose which of the guys she'd set me up with and when she did she very kindly me that I could go out with the nice, sweet, geeky one because I'm a geek too at which point I protested until she promised she was a geek as well and it wasn't a bad thing. (Strangely enough I know what she means.)

At one point, the waiter came over and there'd been this on-going joke between the three of us because servers kept on trying to bring us food we hadn't ordered and I kept on making this dumb joke about it and then when C-Dawg told me the joke was getting old and the waiter laughed, I turned to him and said (and I quote) "Hey, I'm just going to keep saying it because it never be's not funny!"

At which point he suggested that this wasn't our first patio of the evening and I couldn't stop laughing because I couldn't believe I'd said "be's" and how as I'd said it it had TOTALLY been a word.

Ahhh alcohol, what silly things you do to my brain.

We hit up a few more places after that and went for dinner at my favourite place and then watched an awesomely bad movie back at my place. (Hi, I'm Victoria and I'm going to say the word 'place' as many times as possible in one sentence. I are a good writer.)

It was pretty darn awesome and I'm sure there's more I can think of, like how she wet-willied a statue and how she almost convinced me to give nice geek guy my number and how we sat outside the best ice cream place in town and convinced a bunch of other people that yes, they really should go inside and get a cone.

A good day, a great afternoon, a fun evening. It always be's like that with the C-Dawg. I can't wait til we get to do it again.
[Link to post]
30/07/10 - It Never Be's

[icon] Nation
&#160; This was possibly the most ridiculous show I have seen in a long time and I can get Sky 1 I know ridiculous. It could be summed up in three sentences Do you know what's in your cereal? Want to? Read the label. Instead it went on for a hour about how evil the [...][Link to post]27/10/09 - Dispatches ? do you know what?s in your breakfast? (warning...

Blogroll generated by MagpieRSS

[Links][icon] My links

[Icon][Icon] Dominic just discovered that if you have two thousand mockingbirds, technically you've got two kilamockingbirds :).
30/07/10

[Icon][Icon] I last listened to:
The Offspring - She's Got Issues

[Icon][Icon] Most recent photo:
Submersible houseboat

[Icon][Icon]About Me

[Icon][Icon]About this blog

[Icon][Icon]My LQ profile

[Icon][Icon]My /. profile

[Icon][Icon]My Wishlist

[Icon]MyCommerce

[FSF Associate Member]


July 2010
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Search

User tools

XML Feeds

eXTReMe Tracker

Valid XHTML 1.0 Transitional

Valid CSS!

[Valid RSS feed]

powered by b2evolution free blog software