The world of

OpenOffice.org

Michael Meeks

<michael@ximian.com>

“Stand at the crossroads and look; ask for the ancient paths, ask where the good way is, and walk in it, and you will find rest for your souls...” - Jeremiah 6:16

Overview

OO.o – it rocks

power, depth, features

The community

problems & solutions

making a difference

Real ISV / Linux Engineering

Performance issues

C++ symbols everywhere

Desktop integration

To try and demonstrate I planned this talk, and it has some vague structure

OpenOffice.org rocks !

OpenOffice.org rocks !

OpenOffice.org rocks !

OpenOffice.org rocks !

Full help in:

French,

Spanish,

Italian,

Swedish,

Japanese,

Korean,

2x Chinese

English

(and German)

An example ... [ Demo ]

Why I think OO.o kicks the backside of any other free Office component out there

Other Free suites ...

Gnome Office

libole2/libgsf – basis of KDE & Gnome interop

libwv – basis of AbiWord/KWriter word import

gnumeric - a lovely spreadsheet

KOffice

no export -> no interoperability

But XYZ feature is better in ABC !?!!?

doubtless, any 1 feature may be better a <-> b

not a reasonable comparison

Where is Freedom better served ?

Still interesting research test-beds though.

Do real work, for real users, now: really.

Toy vs. Real Office Suites ...

Comparing Apples with Orangutan's – source .tar.bz2 size

StarOffice/OpenOffice.org

Sun is doing it right

OO.o CVS is the authoritative base source

A few other packages plugged in externally for SO.

fonts / icons / clipart / Adabas etc.

Sun is now offering support for OO.o

Freedom / Legal bits:

Source under LGPL / SISSL

SISSL: X11 + ~LGPL for ABI / file-format changes

JCA – joint copyright assignment

You continue to own the copyright

You grant Sun copyright-owner-like rights too

How the two relate to each other a small and shrinking difference

Boxed set every 18 months:

A rough guide to the OO.o schedule:

2004

2005

OO.o 2.0

2006

2007 ...

OO.o 1.1

FF

OO.o 2.0

OO.o 3.0

FF

Upgrade / patch release [ minor version ] every quarter

Acutely different to Free software release process

ODMA feature ...

Community ? / problems

Scheduling problems 18 month releases ...

Get your teeth pulled to experience up-streaming

vacillation, re-writing, 'in our plan'

ooo-build

patch holding ground for up-streaming

collaborative effort between Linux distros:

Ximian, Debian, Red Hat, SuSE, Ark, PLD, [ Win32 ]

Easy to commit to / get involved with

Ask for JCA in the post

Hack here ...

~300 patches, sub-setted several ways.

The things that are wrong under the sun ...

Community ? / general lack of clue

Sun – eager to build an OO.o community

Instant community: – just add 'visionaries'

Proliferation of 'Marketing Projects', with 'Leads'

Extreme mailing list noise ...

SourceCast – formal, role-based, hierarchical

Extraordinary depth of features / from Apache etc.

Want to do something new ?

Ask for a 'incubator project', propose vote, wait fortnight, vote ...

Highly ACL'd CVS structure / permissions / roles

~All substantial projets owned by full-time Sun guys

Possibly very useful for an established project

CVS takes up to an hour to fully tag ...

'Community Council' – uh ?

Collaboration made difficult and bureaucratic ...

Product Engineering on Linux ...

C++ ABI breaks per-distribution, per version

Solution: mandate a C++ compiler version

Compile/ship every C++ dependency yourself

Many distros don't ship with XYZ library

box product targets RH ~7.x -> FC2, old SUSE's etc.

dlopen all but the most stable of system libraries

Micro release / update size

no low-level ABI changes with knock-on effects

Ultra conservative release engineering

better an avoidable crasher bug, than an obvious fix ?

Portability to win32/OSX – include every module

autotools-arn't – heavy dmake / perl usage

Or – how constant ABI breakage / thrash makes Linux painful ...

Product Engineering ...

Compile / ship loads of 'system-level' libs

Unfortunately kills shared library benefits

cf. C++ ABI problems & platform hetrogeneity

Linux vendors of course use system libs

Some included libraries:

libdb, python, freetype, zlib, expat, NAS, neon, curl, sane, myspell, openssl, sablot, stlport ...

Included binaries

pre-built Mozilla binaries

grossly hacked – killing addressbook locking

most Linux vendors axe that with prejudice

Build all the libraries yourself ...

ooo-build - http://ooo.ximian.com/

Building made easy

Wraps the existing OO.o build system

configure

download

make

make install

Used for the 1st build, & packaging

Development iteration more cunning

Hackers guide:

http://ooo.ximian.com/hackers-guide.html

Prerequisites:

~4Gb+ spare space

~512Mb RAM

~1Ghz processor

Final result: after 'linkoo'

ooo-build/

build/

OOO_1_1_2/

sw/

unxlngi4.pro/

lib/

libsw645li.so

LinuxIntelEnv.Set.sh

/opt/

OpenOffice/

program/

libsw645li.so

[ Install ]

[ Build – Tree ]

Simply run 'build debug=true', run OO.o

Demo: 'My first hack' – faster than Kernel iter ?

Where to hack

http://ooo.ximian.com/lxr

UI string -> freetext search -> SID

SID -> identifier search -> case SID_...:

Ignore the build – but don't despair

Do NOT try to 'fix' the build, don't even try

Lost too many good hackers down that hole

Fix the things Sun does not: ergonomics ?

The customer is [almost] always right

eg. Word count.

Bite sized tasks – don't re-write everything

Zoom combo box, X session slaved quick-starter

Emacs key-bindings ?, just sniff around

How to grapple with the beast, and find what you're looking for

Making a difference

OO.o is a comprehensible code-base

Different != Wrong

User base affects impact

substantially larger for OO.o than anything else

Windows users need to hear about Free software

You count:

Gnome: 2000+ CVS accounts

OO.o: 15+ (external) CVS accounts

Get in now – I'm hoping for 3 new hackers.

Sensible not to have got involved yet

No better time to start than now; sign the JCA today

The grass is greener on the other side of the fence...

Performance: Linking

How large the beast is, and how it breaks down ...

Elf Sections; total size: ~115MB

.text = 66MB

.dynstr + .dynsym + .rel* + .plt + .hash = 22MB

~6+ seconds hard CPU linkage / lib. init time

Data for 1.1.2 – much worse in 2.0: gcc 3 (killing link maps)

~20%

_ZZ11getCppuTypePKN3com3sun4star3uno9ReferenceINS1_2io12XInputStreamEEEE36s_pType_com_sun_star_io_XInputStream

Performance: Linking

C code eg. gtk+

extensive use of static methods

impl. hiding by private headers etc.

C++ code:

class ReFactored {

private:

bool SplitOutCommonCode();

};

Interesting C++ features:

a class may be implemented across libraries

any private (internal) re-factoring ~has to change the headers

Ulrich's canonical work:

http://people.redhat.com/drepper/dsohowto.pdf

A nightmare of C++'s creation ...

Performance: Linking

More C++ code:

class VInherit : public VParent {

virtual void AVirtualMethod();

};

Interesting C++ features:

VParent::AVirtualMethod() chaining

vtable construction: scad of symbol lookups

Symbol interposing – LD_PRELOAD etc.

ld's -Bsymbolic might help ?

Scads of weak symbols: typeid, dynamic_cast, throw

gcc 3.x: address not string comparisons:

no internal ahead-of-time resolution possible ...

Link maps ? - can't work; XP issues, maintain

A nightmare of C++'s creation ...

Performance: Linking

The new visibility attribute

http://www.nedprod.com/programs/gccvisibility.html

#define DLLEXPORT __attribute__ ((visibility(“default”))

#define DLLLOCAL __attribute__ ((visibility(“hidden”))

class Visible {

private:

virtual void AvirtualMethod();

public:

DLLLOCAL void InternalToThisLibraryMethod();

DLLEXPORT void PublicMethod();

};

Compile with -fvisibility=hidden

Compatible with MS's __declspec(dllexport/import)

Provides extra in-source semantic information

Extensive markup work underway in OO.o

Major wins possible; cf. Caveats throw, typeid etc.

An up-coming partial solution / annotation ...

Performance: Startup ...

Static initializers

static MyObject aGlobalObject();

All have to be initialized at library link (in order)

Lots of work to delay these until use

Pruning code

Bin-filter

Lots of ancient code for pre XML StarOffice 5.x formats

Scattered, large, chunks of ugliness impeding change: split out into a separate piece – don't link to it.

Detect / remove redundant code

Major speedup in 1.1 vs 1.0

mmap / touch all libraries before link: (urgh!)

Misc. random other hacks to try and speed things up ...

Performance: Startup (from cold)

Major speedup in 1.1 vs 1.0

mmap / touch all libraries before link: (urgh!)

Never optimize before profiling

No decent kernel tools in this area

Badly needed by other projects

Go read 1300 .desktop files: nice design ...

When Linux hangs – crash or not ?

Look at the hard disk light

[ hard from a remote thin / client ]

Dire seek fairness scheduling

find/updatedb totally hoses the machine for real use despite it not being very nice.

The public shame of the Linux Kernel hacker today ....

Developing with plugins ...

Uno Developers Kit (UDK)

allows 3rd party components

eg. libwpd – Will Lachance

http://libwpd.sf.net

Imports WordPerfect files into OO.o ( & AbiWord)

Pretty unusably bad

portability, exposed API

Scripting – lots of API exposed by UNO

an exciting scripting framework

Python, StarBasic, [ Java: non-free ], Mono ?

more language bindings appreciated; Perl etc.

Templates / artwork for non-hackers.

You too could be famous:

There was time to shoe-horn several other easter eggs into OO.o too ...

Source code also shows signs of a StarWars game:

LXR: ScGame

The OO.o hackers are a bright, and fun bunch

Don't start something new, join the team ...

Aesthetic beauty - Icons

Tigert / Jimmac – they rock.

Many hundreds of hours of high quality artistic output

(a calculator apparently)

Hundreds of new industrial strength icons

[ 24bit + alpha

gives some major

advantages ]

Desktop integration ...

The amazing way a little work can hide those gaping cracks:

Keramic / Qt widget integration under KDE, gtk+ under GNOME; here KDE/Keramic:

Desktop integration ...

Locking: nasty business

Toplevel GtkWindow:

event integration

Interesting things ...

VBA / macro interoperability

Translation – not an interoperable solution

Have the nasty file format problems cracked

Some re-factoring required there

Work needed expanding / mapping the OO.o API & improving StarBasic

Can't wait for Mono / .Net - ~2006

Excel API more intuitive / understood anyway

Lots of useful, bite-sized work here.

File format / filters – plenty of work here

Ergonomic & code cleanups all over the shop

Conclusions / Thanks

OpenOffice.org the only viable office suite

Work on OO.o:

Lots of polish required

Lots of small, easy, big-hitting changes left

Amazing the documents you'll get sent

Performance problems not totally hopeless

Make a difference for Freedom

Sign the JCA today ...

What I spent the last minutes saying – nudge your neighbour it's nearly over

Oh, that my words were recorded, that they were written on a scroll, that they were inscribed with an iron tool on lead, or engraved in rock for ever! I know that my Redeemer lives, and that in the end he will stand upon the earth. And though this body has been destroyed yet in my flesh I will see God, I myself will see him, with my own eyes - I and not another. How my heart yearns within me. - Job 19: 23-27

2003-04-02T15:18:38