LWN.net Logo

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Posted May 27, 2008 2:36 UTC (Tue) by roc (subscriber, #30627)
In reply to: Fsyncers and curveballs (the Firefox 3 fsync() problem) by job
Parent article: Fsyncers and curveballs (the Firefox 3 fsync() problem)

> History is linear data and I would expect it to be best stored in a log
> (i.e. appended), and indexed piecemal or even on load.

Super-fast random access to history is very important. For example when a page loads we have
to be able to tell which links should be marked "visited"; if that's slow, page load time is
hurt significantly. Indexing things on load would be bad, since people often have tens of
megabytes of history data and we don't want to read it all in at startup time, since startup
time is also very important.

> All I want is better rendering, perhaps better
> performance, but above all for it to stop allocating all my memory after a
> while.

http://www.numenity.org/blog/wp-content/uploads/2008/05/p...


(Log in to post comments)

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Posted May 27, 2008 4:03 UTC (Tue) by AJWM (guest, #15888) [Link]

Tens of megabytes of history data?  And you search through all that just to properly highlight
the 'visited' links?

Geez, I don't give a rat's behind if a link I visited three years ago is properly highlighted.
Why not just limit it to the last couple of day's worth or the last 1000 entries?   I mean
really, WTF?

And use a hash table.

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Posted May 27, 2008 4:11 UTC (Tue) by roc (subscriber, #30627) [Link]

> Tens of megabytes of history data?  And you search through all that just
> to properly highlight the 'visited' links?
>
> Geez, I don't give a rat's behind if a link I visited three years ago is
> properly highlighted.
> Why not just limit it to the last couple of day's worth or the last 1000
> entries? 

Just go to Preferences ... Privacy ... "Keep my history for at least NNN days" and set that to
2 or whatever suits you.

But there are other users we need to serve who want proper link coloring with years worth of
history.

Making software for a broad audience is hard.

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Posted May 27, 2008 16:37 UTC (Tue) by AJWM (guest, #15888) [Link]

>But there are other users we need to serve who want proper link coloring 
> with years worth of history.

And for those two users, everyone else suffers?

> Making software for a broad audience is hard.

Only if you're trying to make "one size fits all".   If there really are users out there who
want years' worth of link coloring, create an Elephant's Memory edition of Firefox (it never
forgets) with the SQL history.  For everyone else use something sane.

Sure, it means maintaining two slightly different code bases (or one with #ifdefs), but that's
often easier than trying to work around the necessary compromises to meet conflicting design
goals.

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Posted May 27, 2008 17:28 UTC (Tue) by quotemstr (subscriber, #45331) [Link]

And so this with every feature? You'll create an exponential number of combinations of feature
combinations, all of which need to be tested and debugged. When you _can_ create a system that
works for everyone, it's a much better route to go. Look at the Linux processor scheduler:
instead of meekly letting everyone have his own special-purpose scheduler, none of which
worked for everyone, Linus demanded that there be one scheduler with good general-purpose
behavior. And eventually, we got the excellent scheduler we have today.

Imagine if there were a special variant of C for every type of program. Imagine if there were
types of windows that could be used for bitmap graphics, or vector graphics, but not both.
It's a combinatorial nightmare.

Fsyncers and curveballs (the Firefox 3 fsync() problem)

Posted May 27, 2008 17:38 UTC (Tue) by tetromino (subscriber, #33846) [Link]

>> But there are other users we need to serve who want proper link coloring 
>> with years worth of history.

> And for those two users, everyone else suffers?

You know, I find it *incredibly* useful that FF3 remembers months of history. For example,
when you are about to click on a rapidshare link, it's very nice to know that you've already
downloaded the file two months ago, so that you don't use up your quota and don't incur a
two-hour timeout.

The improved history handing is one of the main reasons why I had switched from FF2 to using
FF3 nightlies.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds