Jeremy ([info]dhaaz) wrote,
@ 2007-10-28 12:32:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:faster firefox, mac, optimized thunderbird

Download a Firefox, Build a Thunderbird Optimized for Your Mac
I open Thunderbird whenever I decide to check my college-provided email account. It doesn't do me any good to leave it open, since I never have anything terribly time-critical coming through there and, eventually, the IMAP server seems to get annoyed with Thunderbird checking for new mail every several minutes and stops responding, so I immediately close it. Opening always took what I'll broadly estimate at 10 seconds, and closing took a seemingly random amount of time varying from immediate to, "I've had enough of this spinning rainbow wheel, I'm sending your process SIGTERM right now and you better like it. And if not, I've got a special SIGKILL saved just for you."

Firefox, on the other hand, I leave open forever. I'd leave it up the whole 45 days or more my computer is up, reboot, and open Firefox again. At least, I'd leave it up that long if I could. But it eventually runs slower and slower and responds worse and worse, till, finally, I find I either can't bring the window into focus or can't switch out of it. The rainbow wheel starts spinning again, trying to quit out of the application doesn't work, and, finally, it's SIGTERM time. Then, I immediately restart it, and the process begins again. Only it gets to that unusable stat sooner. Eventually, I just restart, and I'm back where I was.

Over time, this got more and more annoying to me. I moved to Firefox because it was better than Safari, so I'm not going back there. Omniweb is best left as part of early OS X history. I still remember Opera as this ugly browser that showed adds, and super lightweight Dillo doesn't do secure HTTP. I tried Camino. It was okay, but with it, I saw an ad, and I wasn't able to nuke it. I need AdBlock Plus. So, I've got to stay with Firefox.

But, looking into Camino, I found builds optimized for various Macs. G3, two flavors of G4, G5, Intel—I'd never heard of these optimized builds. So, I was off to find an optimized Firefox.

ElFurbe does nightly optimized builds of Firefox 2 and Firefox 3 and posts them at firefoxmac.furbism.com. If you're using a G3, G4, or Intel Mac, are you ever in luck. The optimized Firefox of his that I'm running now starts up in no time, responds faster, and, so far, has given me none of the problems its ungainly official brother did. (It's only been up for half a week so far, though, so we'll see if that keeps up. Regardless, it's more responsive.)

But I couldn't find an optimized build of Thunderbird anywhere. I looked everywhere and had no luck. So, I finally decided to build my own.

Before you can build anything, you'll need to download a tarball of the required Thunderbird source files. Mozilla will tell you what to put in your .mozconfig file that directs the builds process, but you'll get no guidance on optimization from them. For that, I worked off of a posting by ElFurbe and his posted .mozconfig. Here's what I used; if you're planning to build your own, this will save you some time:

#
# Adapted from ElFurbe's 2006.11.13 Firefox mozconfig.
#

. $topsrcdir/mail/config/mozconfig

. $topsrcdir/mail/config/mozconfig

#mk_add_options MOZ_CO_PROJECT=mail # co files via CVS
ac_add_options --enable-application=mail
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-TB-PPC-7450

ac_add_options --enable-svg
ac_add_options --enable-strip
ac_add_options --enable-static
ac_add_options --enable-static-libs
ac_add_options --enable-canvas
ac_add_options --enable-pthreads
ac_add_options --enable-prebinding
#ac_add_options --enable-extensions=default

ac_add_options --disable-pedantic
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-shared

ac_add_options --without-system-png
ac_add_options --without-system-mng
ac_add_options --without-system-nspr
ac_add_options --without-system-zlib
ac_add_options --without-system-jpeg

#
# Processor-specific options
#
# 7450: 
ac_add_options --enable-optimize="-Os -mcpu=7450 -faltivec -ftree-vectorize -ftree-loop-linear -fivopts"
# 7400: "-Os -mcpu=7400 -faltivec -ftree-vectorize -ftree-loop-linear -fivopts"
# G3: "-Os -mcpu=G3"
# Intel: "-Os -march=prescott -mfpmath=sse,387 -mieee-fp -ftree-vectorize -fivopts -ftree-loop-linear"
Drop that in your home directory as .mozconfig, change to the "topsrcdir", run make -f client.mk build, and a Thunderbird optimized for the PPC 7450 processor used by newer G4 Macs should come out the other side as topsrcdir/obj-TB-PPC-7450/dist/Thunderbird.app. If you want to build for a different Mac processor, just comment out the 7450-specific line and mirror what I did there for your processor.

If you want to alter the branding at all, you're in for a treat, as changing MOZ_APP_DISPLAYNAME in the appropriate configuration files reveals that that makes no real difference for Thunderbird. After futzing with it for a while, I still couldn't change the name displayed in the upper left when the program is active, though I could make the name displayed when you mouse over the icon in the dock whatever I wanted; rather frustrating. You can try playing with mozilla/mail/locale/en-US/chrome/branding, and you can try messing with the application package (if you replace thunderbird.icns with a different .icns file, the icon will change, at least), but none of that was enough to remove every occurrence of Thunderbird. Which I didn't really need to do, so I didn't bother to look any further into the issue.

I'm uncertain of the legal issues related to distributing an unofficial build of Thunderbird, and I don't have much of the way in webspace, anyway, so I'm not planning to post this anywhere now, but if you want a copy of the PPC 7450 version I'm using, I can likely get one to you. I can say that my optimized build of Thunderbird starts up in a flash, is more responsive, and quits when I ask it nicely to do so.



(1 comment) - (Post a new comment)

would like to try yours
(Anonymous)
2008-12-06 04:39 pm UTC (link)
Dear Jeremy,

I think I don't have any patience in compiling TB ..
Found your article on the net while searching for Optimized Firefox and liked to try it myself ... but after 5 hours trying to compile it I'm still getting error this and that ...

as internet connection in my place is not fast enough to download any of the lib needed .. I asked you maybe you'd like to share your optimized TB for me to try ...

ummm mine is iBook G4/1GHz ... if mine is not compatible with your optimized TB just ignore ...

please send to sai_a_ku at yahoo dot com
Tx a lot

(Reply to this)


(1 comment) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…