daniewicz Posted January 8, 2005 Report Share Posted January 8, 2005 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 )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. 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. Quote Link to comment Share on other sites More sharing options...
Dyslexic Posted January 9, 2005 Report Share Posted January 9, 2005 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. Quote Link to comment Share on other sites More sharing options...
daniewicz Posted January 9, 2005 Author Report Share Posted January 9, 2005 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? Quote Link to comment Share on other sites More sharing options...
Dyslexic Posted January 9, 2005 Report Share Posted January 9, 2005 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 ;) Quote Link to comment Share on other sites More sharing options...
a13x Posted January 9, 2005 Report Share Posted January 9, 2005 (edited) 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 January 9, 2005 by a13x Quote Link to comment Share on other sites More sharing options...
daniewicz Posted January 9, 2005 Author Report Share Posted January 9, 2005 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? Quote Link to comment Share on other sites More sharing options...
a13x Posted January 9, 2005 Report Share Posted January 9, 2005 I'm also using gcc 3.3.4 in Gentoo. I don't think it would do any harm to MDK. Just do an urpmi install and see what happens. Quote Link to comment Share on other sites More sharing options...
daniewicz Posted January 9, 2005 Author Report Share Posted January 9, 2005 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? Quote Link to comment Share on other sites More sharing options...
daniewicz Posted January 10, 2005 Author Report Share Posted January 10, 2005 (edited) 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 January 10, 2005 by daniewicz Quote Link to comment Share on other sites More sharing options...
Qchem Posted January 10, 2005 Report Share Posted January 10, 2005 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. Quote Link to comment Share on other sites More sharing options...
daniewicz Posted January 10, 2005 Author Report Share Posted January 10, 2005 Are you sure thats an official mdk firefox rpm (or from cooker) BTW? It looks to have a funny name Well, I am not sure (noob status revealed). I downloaded the rpm from here: http://rpm.pbone.net/index.php3/stat/11/ve...akeclub_nl.html Quote Link to comment Share on other sites More sharing options...
Qchem Posted January 10, 2005 Report Share Posted January 10, 2005 that seems to be from the dutch wing of the mandrake club as far as I can tell, although I'm not sure why there's open access to them. You could try rebuilding the cooker rpm if you want to see how mandrake usually do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.