I'm sure I'm not the only one to do this, but I wanted to share my experiences just in case.
I'm a fan of the -Os flag for compilation. I don't use it on everything, but I like Linus' approach - use O2 for things like the kernel, and use Os for applications, especially large, bloated apps like Openoffice.
The trick with Openoffice is that it turns off -Os by default. In the ebuild, you'll see that -Os is replaced with -O2. However, it is easy to edit the ebuild and change it so that -Os is the default. You'll have to recreate the digest after this by:
Code: Select all
ebuild openoffice-version.ebuild digestDoes it work? Well, I've never ran tests with a stopwatch, but it sure feels like it loads faster. I also notice that my -Os binary (when I emerge with -b option to create a package for the rest of the lab) is about 40 MB smaller than the standard openoffice-bin package. Now, maybe openoffice-bin includes things that my build doesn't, I don't know. What I do know is my openoffice is about 40 MB smaller, and it FEELS like it is loading much quicker (placebo effect - maybe, maybe not). If it didn't take 1000 years to compile, I'd compile a -Os and a -O2 version and benchmark them. However, that's a bit too painful, so I'll go with the gut and say it loads faster.
Anywho, I thought I'd pass that along. -Os performs a large percentage of the -O2 optimizations, AND reduces file size. It won't always be just as fast as -O2 (sometimes it is), but for big programs like Openoffice, I think you'll find improved load times / reduced bloat outweighs any CPU gains of -O2.
Mike[/code]

