My optimized build firefox config

I kind had some problem with firefox 3.0.3 recently, it just hanging on loading pages and nothing responsed (not crash), and you can't close any tab eihter. Fist I though it's my network connection problem but Safari works fine at the same time the same web sites. Then I start wondering if it is a firefox problem which I'm using Neil's build, and the official firefox looks fine (but later I met the same issue with offical firefox), so, it's pretty much why I start build my own version firefox follow by MDC.

after building and testing, I found 3.0.4pre, 3.0.3, 3.0.2 all have the same issue, ran out of idea.

Why not just offical firefox?
Well, it's just a little bit too slow in javascript performance.

Here is my .mozconfig

. $topsrcdir/browser/config/mozconfig

#mk_add_options AUTOCONF=autoconf213
#export CC=gcc-4.0
#export CXX=g++-4.0

export MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
mk_add_options MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
#mk_add_options MOZ_MAKE_FLAGS="-s -j4"
mk_add_options MOZ_MAKE_FLAGS="-j8"
mk_add_options MOZ_CO_PROJECT=browser

## intel
ac_add_options --enable-optimize='-O3 -march=prescott -pipe -mfpmath=sse,387 -fforce-addr -mieee-fp -msse3 -msse2 -msse -mmmx -ftree-loop-linear -fivopts -malign-natural -fsched-interblock -fstrict-aliasing'

## testing/profiling
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-mochitest 
ac_add_options --disable-pedantic

## platform
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --enable-macos-target=10.4
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk
# ppc
#ac_add_options --enable-prebinding


## commonly used
ac_add_options --with-distribution-id=com.creativecrap.minefield
ac_add_options --enable-official-branding 
#ac_add_options --with-branding=/path/to/branding

ac_add_options --enable-application=browser
ac_add_options --enable-libxul --disable-static
#ac_add_options --enable-static --disable-libxul
ac_add_options --disable-crashreporter
#ac_add_options --disable-javaxpcom

## other options
ac_add_options --disable-accessibility
ac_add_options --enable-profile-guided-optimization 
ac_add_options --enable-strip
ac_add_options --enable-reorder
ac_add_options --enable-crypto
ac_add_options --enable-single-profile
ac_add_options --enable-pthreads
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-accessibility
ac_add_options --enable-cairo
ac_add_options --enable-default-toolkit=cairo
ac_add_options --enable-default-toolkit=cairo-cocoa
ac_add_options --disable-shared
ac_add_options --disable-updater
ac_add_options --disable-composer
ac_add_options --disable-ldap
ac_add_options --disable-mailnews
ac_add_options --disable-profilesharing
#ac_add_options --enable-extensions=default
#ac_add_options --disable-jsd
#ac_add_options --enable-static-libs
#ac_add_options --disable-installer

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

sure build with PGO:
make -w -f client.mk clean profiledbuild

make dmg package, in the @obj-dir/dist/
make package

This is not the fastest optimized configure I had build, but the last one, and the test result from Sun Spider is 8430.6ms. The fastest build is 4207.8ms with -ffast-math but it's a lot of javascript will fail to run, and the rest of build are all around 8235ms ~ 8460ms.


Comments (0)

Login

E-mail
Password

Login with Facebook

If you have a facebook account, you may also connect with your facebook account

Login with Facebook

zhim! extended

zhim! extended is your own free personalized Chinese Input Method app on your iPhone or iPad. Great for typing text when mix-up Chinese and English without bothering switch between keyboards.



支援自訂輸入法詞庫
支援自訂輸入法鍵盤
支援自訂數字鍵快選候選字
支援外接鍵盤

已測試相容輸入法:
行列
倉頡
嘸蝦米
大易
倚天26
拼音
注音

Google Ads

About the Author

He is a freelance web developer who interested in front-end development, web accessibility, web design, graphic design and web development.