Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

TIP - Shrinking Openoffice

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
extraketchup
n00b
n00b
User avatar
Posts: 29
Joined: Mon Jun 21, 2004 1:07 pm
Location: Maine
Contact:
Contact extraketchup
Website

TIP - Shrinking Openoffice

  • Quote

Post by extraketchup » Thu Sep 14, 2006 1:01 am

Howdy all,

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 digest
I've never had a compile error doing this. Why do I do this, do you ask? OpenOffice works fast enough for me (I can't out-type it), but those load times - ouch! Reducing the size means reducing the load times, and the hard drive is a much more noticeable bottleneck than a few missed optimizations for the CPU (in this case).

Does 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]
There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy.
Top
ChrisWhite
Retired Dev
Retired Dev
User avatar
Posts: 399
Joined: Thu Jul 08, 2004 7:19 pm
Location: Stockton, CA
Contact:
Contact ChrisWhite
Website

  • Quote

Post by ChrisWhite » Thu Sep 14, 2006 2:12 am

Have you considered contacting the maintainer and finding out why they disabled -Os on this? I'm somewhat curious myself. Generally, flags are 'dumbed down' if they're not -O1 or -O2. -Os is not used very often, so it generally is not taken into consideration. I'd check and see.. maybe search bugzilla and post an ehancement but stating your findings.
Top
Post Reply

2 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic