Fragmentation: SQLite & Friends
I am happy to report that the SQLite fragmentation problem is now solved. I copied my profile a month ago, and my places.sqlite is still in a single fragment! There was a similar fix done to Firefox disk cache. Thanks to helpful comments on my OSX preallocation cry for help, we now preallocate efficiently on OSX too.
Startup cache is the last remaining bastion of fragmentation, but that’s already 10x better than it was a month ago. I have two complimentary solutions for that: either omnijar startup cache generation for core code and/or write the cache more efficiently.
Firefox 4 will be a lot more gentle on those spinning platters.
GCC
I helped Jan Hubicka on a GCC summit paper. Those nasty static initializers will not be a hassle in GCC 4.6!
I keep wanting to blog about how we switched to GCC 4.5 and how life is wonderful, but life didn’t work out this way. So far we tried switching away from 4.3 compiler three times. The first time GCC completely failed in terms of -Os performance. C++ -Os is more bloated in 4.5 (because that option is benchmarked on C apps). Then it turned out that libffi was being miscompiled (we also found a related bug in libffi). Last time, we tried switching to GCC 4.5 + -O3 since that performs much better than -Os, but that broke sunspider. Hopefully we can fix the sunspider issue and try again next week. I would really like to utilize GCC PGO to produce fastest possible Linux Firefox builds.
Nonetheless I happy with recent GCC progress. With Jan’s help, GCC will eventually be very good at compiling Mozilla. In my spare cycles I’ve been working on setting up GCC benchmarks using Mozilla to help avoid future surprises like we discovered in GCC 4.5. More on this later.
As a Linux user, I appreciate your commitment to making Firefox 4 even faster on Linux.
Thanks! You need to hire or clone yourself out to optimize the operating system layers below the browser. “Taras Glek Performance Certified (C) – don’t boot without it!”
Thanks for the compliments.
Couple of notes:
* There are many other people working on cool bits of Firefox performance, unfortunately they don’t blog about it.
* I try to make any perf improvements cross-platform when possible. Linux just happens to be convenient to develop on.
* I’ve met a few like-minded people working on the kernel, gcc, open office. There is no need for a single developer to monopolize optimization opportunities
I do wish there were more systemsy developer blogs.
@tglek: Please give these other developers that are doing great things a small nudge to blog about it. It does a lot more to promote open source via accomplishments than to try to market it with snazzy marketing material.
Making Firefox _feel_ faster makes you my hero and Firefox 4 beta 7 is awesome.
Just a naive question, does -O2 break sunspider in the same way that -O3 did ? I’ve always found -O2 to be much more reliable on all accounts, and that is also what (in my experience) the rest of the world tends to use the most.
@Benoit same problem at -O2.
What is progress on compiling Firefox using gcc 4.6?