Presentation is loading. Please wait.

Presentation is loading. Please wait.

OpenOffice.org - migration & development

Similar presentations


Presentation on theme: "OpenOffice.org - migration & development"— Presentation transcript:

1 OpenOffice.org - migration & development
Michael Meeks “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

2 Overview Development code structure & sample hack more performance
scripting / pyUno cool things to hack on ? Migration management / lock-down VBA to StarBasic ? (or not) Conclusions / Questions

3 Big Eng. meets Free Software
Traditional OpenOffice.org Form iTeam Write Specification Code to Specification QA cycle Commit Customer complaints 9-18 month delay Get itch Fix irritation Commit / test commit / release Traditional Free Software Customer screaming commences Child Workspace all work done on branches, tested, then merged HEAD permanently releasable, pain for small fixes. Irony – small 'entry-level' things: disproportionately painful Various compromises possible

4 ooo-build - http://go-oo.org/
Leaner / simpler building Works well on Novell / Debian / Mdv / ... less joy on Fedora. Wraps the existing OO.o build system configure ./download make make install Ultimately aim to get everything going up-stream Somewhat different philosophy: patch sub-setting / non-Win32 features / distro specifics etc. Prerequisites: ~2.5Gb+ disk ~512Mb RAM ~Ghz processor

5 Hacking ... Demo: my first hack ... Install / link / etc.
How to grapple with the beast, and find what you're looking for Demo: my first hack ... Install / link / etc. poke at Fix the things Sun does not: ergonomics ? The customer is [almost] always right eg. CSV file field separators eg. Style apply ergonomics eg. Icons / artwork / GUI re-works Research tasks information can be more easily absorbed than patches infrastructure / community / expectation setting

6 More Performance ?

7 Linking – a graphical view ...
Lookup 'rtl_ustr_compare': soffice.bin libc ld-linux sal ucb svx sw ...omit dynstr + .dynsym + .rel* + .plt + .hash = 22MB (OO.o 1.1) Symbol hash Why ? - Vague linkage inline functions templates type_info exceptions dynamic_cast typeid Why ? - interposing fprintf write stderr 1.2 compares avg. per library

8 Immediate linking ... relocations
need to be done before dlopen completes _ZTV8Foo: .long Base::getCount .long Parent::setCount ... .long Foo::addKipper .long Foo::removeKipper All symbol driven[!] Vague linkage ... 50/50 external/internal

9 Simple / Obvious generic link fixes:
Code to go up-stream pre-computed hashvals -Bdirect linking -zdynsort Known issues yet to be fixed: external symbols in hash table / chain kills gratuitous cache trashing sort relocations by -Bdirect yet futher cache pattern improvement make cache bucket size range 2^n remove randomizing effect of (hash % prime[n]) access merge .direct, .hashvals & add shrunk chain info further consolidation of access patterns “no hash value conflicts” flag: remove -Bdirect strcmp's.

10 Other performance bits:
Vague linkage cripples us all shlib components loaded RTLD_GLOBAL compile & link: 1 monster 'libexcept.so' => RTLD_LOCAL 40% linking speedup (~700ms) Other things Code size redux: Splitting out dialogs: aggregation not inheritance. Sharing exception data COMDAT (?) Better linking: vtable copy logic, & via-vtable / parent chaining. 64bit support don't load lots of 32bit libraries to launch OO.o ...

11 Comic relief after hard-core linking discussion ...

12 Other areas ... psprint statting every font on startup [fixed]
to write a timestamp to a cache file that was subsequently never used [ fixed in recent builds ] ideally should re-use fontconfig font data new UI design very file heavy [needs re-work] 300 scattered XML files to describe the OO.o UI New #1 Offender: the Registry / Configuration: Registry – cached ... in scattered files Avoids re-parsing – but each piece in a different file Can parse 100,000+ lines of XML during 1 seek – duh. Images – cached ... in scattered files Split out of 1 big file – into ~8 scattered files 4.5Mb of .zip -> 1Mb of uncompressed / scattered 'cache'

13 Bloatedness ... memory chewage
MySpell checking – a huge beast [recently un-fixed] by mmapping the dictionary & using a simpler hash 3.5Mb -> 1Mb of (non-shared) memory usage at least 1Mb saved for single-user case. fix in ooo-build, not up-stream yet exploding types.rdb – mmapped but ... went from 3.5Mb in 1.1.x to 6.1Mb in 2.0 – why ? [GHEX ...] images.zip – much better vs. 1.1.x resources unfortunately doubles size of .zip with (~never used a11y) icons (wasting 500Kb core to store .zip directory). [.zip stamp] fix implementing icon theming (in ooo-build, festering in cws)

14 PyUno & scripting:

15 Easy to add packages ... C++ a bit of a nightmare: Java / Python better ... Tools->Package Manager Simple .zip file: Addons.xcu <oor:component-data oor:name="Addons" ...> <node oor:name="AddonUI"> <node oor:name="OfficeMenuBar"> <node oor:name="org.openoffice.Office.Addons" oor:op="replace"> <prop oor:name="Title" oor:type="xs:string"> <value xml:lang="en">~Blog</value> </prop> ... <node oor:name="Submenu"> <node oor:name="AppleBloggerSave" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> <value>vnd.sun.star.job:service=org.openoffice.pyuno.Blog.Save</value> </prop>... </oor:component-data>

16 Easy to add packages (2) ... Simple .zip file: Addons.xcu
And - foo_python_script.py: g_ImplementationHelper = unohelper.ImplementationHelper() class BloggerSave( unohelper.Base, XJob ): def __init__( self, ctx ): self.ctx = ctx def execute(self, args): SavePost() return 1 ... g_ImplementationHelper.addImplementation( \ BloggerSave,"org.openoffice.pyuno.Blog.Save", ("com.sun.star.task.Job",),)

17 Cool things to hack on

18 Access / Layout ... MS Access import
Evil file format done: Not so robust need an 'Importer' not a D/B backend. import templates / forms / macros etc. Layout: visual / translation improvements: 2 prototypes exist already some simple hacking required.

19 Scribble/GStreamer/Wiki/...
Wiki integration richer document editing / collation of pages Evolution composer revolutionize with the OpenDocument format ? GStreamer integration slay the non-Free Java Media Framework Scribble overlay: Tablet PC + document: draw / annotate on top of it. Content mgmt. systems ... ODMA / [ common Unix space API ? ] SVG import & render ...

20 Migration: VBA & lock-down

21 Lock-down ... Highly powerful system
LDAP backends, multiple layers etc. everything tweakable – font mapping, colors etc. etc. In reality: tiny sub-set really useful: default file format, etc. ooo-build: gconf keys for some of these 'just another layer' Sabayon integration (?) Templates / dictionaries user-dict re-write [urgh] 'ootool' ...

22 StarBasic vs. VBA ... Guess which – an interactive macro game:
[ All examples from VbaStarBasicXref.sxi ] 1. wksh = ThisComponent.CurrentController.ActiveSheet vs. wksh = ActiveWorksheet 2. msgbox WorksheetFunctions.Average(Range("A1:A5")) Dim oSheet, FuncService FuncService = createunoservice("com.sun.star.sheet.FunctionAccess") oSheet = ThisComponent.CurrentController.ActiveSheet msgbox FuncService.callFunction(“AVERAGE”, _ array(oSheet.getCellRangeByName("A1:A5"))) Lots more examples ... OTOH – no 'Replace' problem

23 Conclusion OO.o – an amazing base to build from
lots of things need doing great re-use / amazing development possible plenty of sillies left to fix ... re-use OO.o in your project ... Lots of cool projects to get involved in ... Links: Google: VbaStarBasic.sxw ... Sign the JCA today ! 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

24


Download ppt "OpenOffice.org - migration & development"

Similar presentations


Ads by Google