Jump to content

any firefox builders out there?


daniewicz
 Share

Recommended Posts

I have been playing around with building firefox from source using gcc 3.3.2 and Mandrake 10.0. Various compile options have been tried as I seek to generate an optimized firefox for my AthlonXP (translation: I like to tinker :cheesy: )To test the speed of my builds, I am measuring page rendering time with this test.

 

The official firefox 1.0 downloaded executable gives me an average test score of 3.0 sec. Using various compile options to increase speed (as found from the MozillaZine forum), I have yet to create a build which is faster than the official. :angry: A typical test score for my "optimized builds" is 3.5-4.0.

 

I have posted a query on the MozillaZine forum, but I am curious if any of you here have tried building an optimized firefox on a Mandrake box.

Link to comment
Share on other sites

I haven't tried building Firefox, but in the packages I have tried to "optimize," I found that march/mcpu=athlon-xp doesn't gain much (if anything), and -O2 often works better than -O3, especially with something like Firefox where you can trust the developers to inline their functions optimally. You're most likely already using -fomit-frame-pointer.

 

And, of course, I found that it's hard to improve on Mandrake's excellent packaging. You should benchmark not only against the mozilla.org binary, but also against a build of the Firefox SRPM from Cooker.

Link to comment
Share on other sites

I have found that -O3 will result in a firefox that will crash consistently. I have used the other optimizations you mention. Below is a typial .mozconfig file.

 

. $topsrcdir/browser/config/mozconfig
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --enable-plaintext-editor-only
ac_add_options --enable-strip
ac_add_options --enable-strip-libs
ac_add_options --enable-xft
ac_add_options --enable-freetype2
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-static 
ac_add_options --disable-shared 
ac_add_options --enable-optimize="-O2 -fomit-frame-pointer -march=athlon-xp"
ac_add_options --enable-official-branding

 

I was aware that RPM's of firefox are available, but I have never tried them. What is SRPM? What is Cooker?

Link to comment
Share on other sites

An SRPM is a source RPM. It contains all the source code, patches and optimizations used by a packager, Mandrakesoft in this case, to build RPMs. You can use the rpmbuild command to build an RPM from an SRPM. Cooker is the developmental version of Mandrake. Cooker is great for people who like to "tinker" but are too lazy to do it themselves, and know enough about Linux to not wet their trousers when their computers won't boot ;)

Link to comment
Share on other sites

OMG !!!

 

I've recently installed Gentoo and I had to build everything from source including Firefox. I felt that it was faster than in MDK but I did no benchmarking.

 

After running your test, daniewicz, I found this surprising result. My custom built Gentoo Firefox is 3 times faster than the stock MDK one !!

 

:woot_jump:

Edited by a13x
Link to comment
Share on other sites

After running your test, daniewicz, I found this surprising result. My custom built Gentoo Firefox is 3 times faster than the stock MDK one !!

Now I am really annoyed :P

I am glad the test was able to quantify your building efforts.

 

The folks from the MozillaZine forum tell me when mozilla.org makes their builds, they use GCC 3.3.4. Since I am using 3.3.2, I wonder if this could be part of my problem.

 

Would I be in danger of damaging my Mandrake 10.0 installation if I upgraded from 3.3.2 to 3.3.4? Would I need to uninstall 3.3.2 first?

Link to comment
Share on other sites

I have been told by the folks from the MozillaZine forums that mozilla.org makes their builds using gcc 3.3.4. However, I now do not believe this is true.

 

about:config

 

Build platform

target

i686-pc-linux-gnu

Build tools

Compiler Version Compiler flags

gcc gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1) -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -pthread -pipe

c++ gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1) -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe -I/usr/X11R6/include

Configure arguments

--disable-ldap --disable-mailnews --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,

negotiateauth --enable-crypto --disable-composer --enable-single-profile --disable-profilesharing --disable-debug '--enable-optimize=-Os -freorder-blocks -fno-reorder-functions -gstabs+' --disable-tests --enable-official-branding --enable-default-toolkit=gtk2 --enable-xft --disable-freetype2 --enable-static --disable-shared

 

To make my builds, I have been using gmake -f client.mk build as directed by numerous websites. Should I be using some of the gcc options listed above to speed up my builds?

Link to comment
Share on other sites

Dyslexic:

 

I took your advice and downloaded the firefox 1.0 rpm to benchmark it (firefox-1.0-1mcnl.i586.rpm). It scored a 4.6 on the Scragz test. As a reminder, the official firefox 1.0 downloaded executable scored a 3.0.

 

OUCH, the rpm is slow.....Even some of my builds are faster :)

Edited by daniewicz
Link to comment
Share on other sites

rpms have to support larger ranges of hardware than custom built software which is generally why they are more bloated than custom built software and can occassioanlly be slower. Why the mandrake rpm for firefox is so slow I have no idea, I'd have expected it to be quicker then the very general firefox one.

 

Are you sure thats an official mdk firefox rpm (or from cooker) BTW? It looks to have a funny name.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...