Linked by Eugenia Loli on Sat 8th Jun 2002 17:48 UTC
Mozilla & Gecko clones Linux-sxs.org features an informative article on how to compile Mozilla from source. Especially if you have switched to GCC 3.1, you can build some really optimized binaries for your Mozilla, as GCC 3.1 does better optimization in general, plus it supports special optimizations for Pentium4 or AthlonXP.
Order by: Score:

I was just wondering if there was an optimised option for thoughs of us who don't know how to roll our own. Any ideas or pointers?

Oh No...
by Speed on Sat 8th Jun 2002 18:29 UTC

Great...now that I know that it does Athlon XP optimizations, I have no choice but to recompile everything on my main system, just to see if I notice any performance increase. Why'd they have to tell me!?! Ignorance is bliss.....

Cal, if you want no-fuss, no-muss binaries for Windows, your best bet is Cygwin or MinGW. Right now MinGW has 3.1 available, but Cygwin is still showing 2.95, at least for their stable branch.

If you need optimized Windows binaries, do it the right Windows way, and use the latest Visual Studio, not with GCC. If you don't have it, well, bad luck...
http://www.mozilla.org/build/win32.html

-fomit-frame-pointer
by Anonymous on Sat 8th Jun 2002 19:12 UTC

One really should turn on the -fomit-frame-pointer optimizations, its only needed for debugging. Turning
it on frees a cpu register, and generally speed things up _alot_

A couple small points.
by Lawrence Gold on Sat 8th Jun 2002 21:44 UTC

1) I believe that -march implies -mcpu, so it's probably a little redundant to use.

2) Be careful about using -fomit-frame-pointer on an x86 system. Unless things have changed recently, one of Mozilla's components actually depends on there being a frame pointer -- I believe it's nsprlib -- and if you use -fomit-frame-pointer, you'll just get a segfault on startup. (Disclaimer: I have only confirmed this with gcc-2.95.3 so far.)

Result is ...
by chicobaud on Sun 9th Jun 2002 01:14 UTC

Maybe you all that compiled and optimized from source could post if it made a (real) difference (in the case you tried a bin before make.
CB

Wow
by rajan r on Sun 9th Jun 2002 02:11 UTC

Loading Mozilla 1.0 (Linux) is 2x faster. Loading new windows, preferences and so on is 1.5x faster. Not bad. Rendering time is somewhat the same, no noticible difference.

Mr. rajan r
by chicobaud on Sun 9th Jun 2002 06:07 UTC

To Rajan r.
Did you compile it with optimized options ?
I confess I am too lazy to set 7/8 variables on win2K to compile it with a trial (3o days) Intel C compiler I got on a cover CD from 'Linux magazine'.
I got the mozilla1.0.exe for win2K (it's Saturday and I am suffering from too laziness ;) , It is good (1.0 or 1.x). Hicks...

...
by rajan r on Sun 9th Jun 2002 07:45 UTC

Did you compile it with optimized options ?

There isn't any optimize mode for my processor, a Duron 700mhz. You know, the one 2 years ago was the fastest thing...

I used GCC 3.1.0 on Mandrake Linux 8.2. Maybe it's my connection speed.. ;) After all, everything else is so much more faster. It is like comparing optimized KDE (with obj. prelinking, goodie) and binary KDE from Mandrake...

hmmm
by rajan r on Sun 9th Jun 2002 07:55 UTC

I spend 4 hours compiling this, tomorrow, I would sweet talk my friend that have a Athlon XP to allow me to compile it with Athlon XP optimization.... GCC 3.1 works on FreeBSD, right? He is using 4.4 (and he hates Linux, calls it a bloated pig from hell; which I kinda agree)

Re: hmmm
by Anonymous on Sun 9th Jun 2002 10:57 UTC

(and he hates Linux, calls it a bloated pig from hell; which I kinda agree)

Says the Mandrake guy... please go somwhere else with this kind of trolls. OS Forums -> OS Wars, or slashdot. Useless statements and comments aren't appreciated in here.

...
by rajan r on Sun 9th Jun 2002 11:07 UTC

Says the Mandrake guy... please go somwhere else with this kind of trolls. OS Forums -> OS Wars, or slashdot. Useless statements and comments aren't appreciated in here

Apparently, I was comparing FreeBSD and Mandrake. And Mandrake is the most bloated thing out there, when compared with FreeBSD. That's a fact. I'm using Mandrake currently because I'm still evaluating which distribution to jump on, or to jump on some BSD. The highest on the list right now is Gentoo Linux... (well, I can just pick the packages, burn in on a CD (I have a slow dial-up) and start, and walk away, come back in a day or two and have something completely non-blolated and totally optimized for my Duron Morgan I'm getting tommorrow. (I think Eugenia can back up that claim about Mandrake, which BTW, I didn't made)

I'm no troll :-).

4 hours ?
by chicobaud on Sun 9th Jun 2002 15:01 UTC

Are you sure it took so long on your Duron 700 ?
Guess I will gave it up, I have Celeron 1000.
(Some people just can't accept criticism about Linux).

Re: 4 hours ?
by rajan r on Sun 9th Jun 2002 16:37 UTC

Are you sure it took so long on your Duron 700 ?
Guess I will gave it up, I have Celeron 1000.
(Some people just can't accept criticism about Linux).


I dunno, I started the compile, went out, came back in 4 hours. Sticking around and waiting for something to finish compiling isn't my cup of tea, it is BORING. (if you plan to stick around to wait for the compile to end, buy yourself a paperback novel, some magazines or a portable gaming console like gameboy..)

(Some people just can't accept criticism about Linux).

Actually, that reminds me of me. Last time I was an all out Linux zealot. Say just one thing bad about Linux, and you would recieve my wrath. Then as Mandrake sucked more and more, I started rationalizing. For me, I kinda interested in freeBSD and it's package manager...

OpenOffice also?
by Anonymous on Sun 9th Jun 2002 18:22 UTC

Would be great if someone wrote something similar for
compiling OpenOffice.org, its not as straight forward
as Mozilla...

Re; OpenOffice also?
by Eugenia on Sun 9th Jun 2002 18:29 UTC

>Would be great if someone wrote something similar for compiling OpenOffice.org

It is all here:
http://www.openoffice.org/dev_docs/source/build_linux.html
Just make sure you have set the GCC flags as shown on our article, on the same terminal or session you are going to build openoffice.

Re: OpenOffice also?
by Eugenia on Sun 9th Jun 2002 19:01 UTC

Just be careful where the OpenOffice build page says:
$SRC_ROOT> tcsh
$SRC_ROOT> source LinuxIntelEnv.Set
Open the LinuxIntelEnv.Set file and check if there are any GCC flags over there. If yes, change them according to our GCC suggestions on our article.

Gentoo has GCC 3.X.X
by AutoBot on Mon 10th Jun 2002 01:29 UTC

You can install gentoo which is a source based distribution anyway with GCC 3.X.X and with the proper processor you will have a linux system that is more responsive than any other you have seen before it.

Sorry but I have to plug Gentoo every chance I get.

...
by rajan r on Mon 10th Jun 2002 02:09 UTC

Would be great if someone wrote something similar for
compiling OpenOffice.org, its not as straight forward
as Mozilla...


I second that. I couldn't get OpenOffice.org to compile properly using http://www.openoffice.org/dev_docs/source/build_linux.html
Maybe I would try again, one day.

qt3 ?
by jamal on Mon 10th Jun 2002 05:36 UTC

it's written there he use /usr/lib/qt3 as qtdir , does mozilla support qt3 ? cause i can't get it to work , qt-mozilla list seems dead, the last message pointed that mozilla still use qt2 ..
err.. sorry for my english ;)

Re: qt3 ?
by Eugenia on Mon 10th Jun 2002 05:58 UTC

As you can see, he also enables GTK+, so the QT dir is for something else, not for building Mozilla's GUI with QT.

BTW, if you are planning to re-compile QT, you will have to edit its configure script to enable optimizations, because it does not "listen" to GCC's environmental variables.

My compile worked
by rajan r on Mon 10th Jun 2002 08:12 UTC

With QT 2. I didn't optimize it cause I didn't know how to do so.. confusing little thing ;-).