TODO:
    + hard-code the few truly useful text encoding
      translations into sal - and dlopen the rest on demand (?)

    + Size saving ideas:
	+ invstigate rtl::OUString bits
	    + can we whack them into
	      const sections (?)
	    + [ magic 'no ref-count' bit (?) ]
		+ whack some flags in the ref-count.
	    + can we create a SAL_CONST_USTRING("")
	      macro ? [ cross-platform ? ]
	+ unloading shlibs (?!) [ dupping nice then but ... ]

    + 2nd soffice - pages in *everything* - urgh ...
	+ we lost what we didn't need - and ... bang ...

    + re-generate memory.sxw / memory.txt
	+ memory figures are broken without this.

    + Generate a run-time library-dependency picture/chart ...
	+ make it easy to re-generate.

Overall memory usage:

    + savings by size:
	+ 5Mb from .rdb re-work
	+ ~3Mb from i18npool (?)
	    + put all _en in 1 lib, all _es in 1 etc.
	+ 400k - bogus .comment sections
	+ 400k - sndfile etc. bits - & 2 libs on startup
	+ 330k - total Sfx Slot size (etc.)
	    + [ plus some stubs ]
	+ 208k - remove avmedia
	+ 80k - run-time filter cache storage (to OString)


+ Document load:
	+ do 'on-demand' data conversion for embedded objects [!?]
	+ better quality, better performance etc. [!?]

** Overall source section break down **

Section size breakdown
 code            55808kb - 49%
 linking         16294kb - 14%
 data            13840kb - 13% - excluding .bss
 exceptions      11903kb - 10%
 data relocs      5712kb -  5%
 symbols          1334kb - 1.2%
 debug             737kb - 0.65%
 versioning        470kb - 0.41%
 misc              140kb - 0.12%
 init/fini          12kb - 0.011%
 c/d-tors            8kb - 0.0076%
 Total: 116778352 bytes

.comment - needs binutils to elide identical .comment sections ...

** Best way to see data **

Compile with symbols:

objdump -t libpsp680li.so | grep '\.data'


+ libsw's .data section has a huge scad of:
  from 0x7cf41c - GCC: 4.0.2 ...
  to   0x7d7f9c
    + '.comment' section ... [ hmm ]

Large .data offenders:
 + i18npool.uno.so   - 2967kb
 + libdict_zh	     - 2209kb
 + libdict_ja	     - 1024kb
 + libsw	     -  545kb - **
 + libsc             -  407kb
 + libsd             -  315kb 
 + libpsp            -  310kb - **  - xlat unicode -> MS mapping, 'NO_MAPPERS' ?
 + liblocaledata_others 297kb
 + libxo	     -  262kb - lots of xml tokens & strings
 + slideshow.uno.so  -  211kb - **
 + configmgr2.uno.so -  181kb
 + libtk             -  176kb
 + libdbu	     -  138kb
 + libdbtools        -  121kb

Memory shrinkage: to start 2,553,127 bytes
    + types.rdb ...
    + reduce bogus usage of services.rdb

** Images.zip
    + check the compression algorithms &
      the 'store data behind 0 alpha' state ...

** Real (allocated) memory usage is tiny 
    + code size is large & painful

** Looking at eg. libsvx:
Section size breakdown
 code            5207kb - 54%
 linking         1533kb - 16%
 eh frame?        860kb -  9%
 data             624kb - 6.5%
 data relocs      553kb - 5.8%
 debug            516kb - 5.4%
 exceptions       246kb - 2.6%
 versioning        39kb - 0.41%
 comment           27kb - 0.28%

 Total: 9840975 bytes
> ls -l libsvx680li.so
-rwxr-xr-x  1 michael users 14303406 2005-10-26 16:28 libsvx680li.so

    Why is there a 4MB difference between the sum of the section
sizes & the overall size ?


    + memprof shows only ~2.5Mb of 'real' memory usage ...
	+ quick look at shrinking it ...
	+ desktop::Desktop::OpenSplashScreen() 
	    + IntroWindow::IntroWindow - 145k - all gtk+ related

	+ framework::AutoRecovery::implts_readConfig - 130k
	    + filter::config::FilterCache::load ...
		+ filter::config::FilterCache::impl_loadSet
			+ CacheItem hash table ... stl foo ... [124k]

		+ filter/source/config/filtercache.cxx (impl_loadSet):
			(*pCache)[pItems[i]] = ...
			[ hash table ? ]
				+ big old hash table ... [ lots of entries ? ]

Non-shared in memory:

Size/kB	NAME
17,256	svx/...libsvx680li.so
16,354	sw/...libsw680li.so
8,926	/lib/libc.so.6
6,151	svtools/...libsvt680li.so
6,136	xmloff/...libxo680li.so
5,984	offapi/.../types.db
5,329	sfx2/...libsfx680li.so
5,161	instsetoo_native/.../images_industrial.zip
5,107	vcl/...libvcl680li.so
4,416	services.rdb
4,313	toolkit/...libtk680li.so
3,921	i18npool/...i18npool.uno.so
3,789	libicudata.so.26.0
3,523	configmgr/...configmgr2.uno.so
3,344	framework/...libfwk680li.so
1,991	libuno_sal.so.3
1,954	connectivity/...libdbtools680li.so
1,747	comphelper/...libcomphelp4gcc3.so
1,461	basic/...libsb680li.so
1,408	svtools/...libsvl680li.so
1,224	psprint/...libpsp680li.so
1,154	libicui18n.so.26.0
1,101	/usr/lib/libcrypto.so.0.9.7
1,052	/opt/OOInstall/help/en/swriter.db
998	libstlport_gcc.so
994	libdb-4.2.so
973	unotools/...libutl680li.so
962	tools/...libtl680li.so
949	/usr/lib/libstdc++.so.5.0.6
924	/opt/OOInstall/help/en/swriter.ht
878	libucpchelp1.so
858	vcl/...libvclplug_gen680li.so
853	linguistic/...liblng680li.so
842	xmlscript/...libxcr680li.so
827	ucbhelper/...libucbhelper3gcc3.so
819	libicuuc.so.26.0
769	framework/...libfwe680li.so
721	ucb/...ucpgvfs1.uno.so
667	goodies/...libgo680li.so
544	sot/...libsot680li.so
525	basegfx/...libbasegfx680li.so
519	package/...libpackage2.so
487	soffice.bin
485	ucb/...libucpfile1.so
481	libuno_cppuhelpergcc3.so.3
471	/usr/lib/libfontconfig.so.1.0.4
466	/usr/lib/libfreetype.so.6.3.5
461	/opt/gnome/lib/libbonobo-2.so.0.0.0
438	/opt/gnome/lib/libgnomevfs-2.so.0.601.0
407	/lib/libpthread.so.0
406	package/...libxstor.so
385	filter/...libfilterconfig1.so
384	/opt/gnome/lib/libORBit-2.so.0.0.0
376	stoc/...regtypeprov.uno.so
365	/lib/ld-2.3.3.so
361	shell/...gconfbe1.uno.so
354	ucb/...libucb1.so
353	svx/unxlngi4.pro/bin/svx680en-US.res
343	dtrans/...libdtransX11680li.so
330	libsndfile.so.1.0.9
317	framework/...libfwi680li.so
315	/opt/gnome/lib/libatk-1.0.so.0.0.0
290	vcl/...libvclplug_gtk680li.so
272	sw/unxlngi4.pro/bin/sw680en-US.res
269	sax/...sax.uno.so
267	libuno_cppu.so.3
259	/opt/gnome/lib/libgobject-2.0.so.0.400.6
247	/opt/gnome/lib/libgconf-2.so.4.1.0
245	desktop/...libspl680li.so
233	/opt/gnome/lib/libpango-1.0.so.0.400.1
232	stoc/...typemgr.uno.so
231	stoc/...servicemgr.uno.so
230	uui/...libuui680li.so
227	/usr/lib/libldap.so.199.3.4
217	/usr/lib/libssl.so.0.9.7
210	libicule.so.26.0
208	avmedia/...libavmedia680li.so
207	/usr/X11R6/lib/X11/fonts/truetype/thowr___.ttf
204	/usr/lib/locale/en_GB.utf8/LC_CTYPE
203	/lib/libresolv.so.2
192	i18npool/...liblocaledata_en.so
187	extensions/...ldapbe2.uno.so
182	vos/...libvos3gcc3.so
172	framework/...libfwl680li.so
168	svtools/...svtmisc.uno.so
167	stoc/...security.uno.so
158	libreg.so.3
156	/usr/lib/libexpat.so.0.5.0
147	sfx2/unxlngi4.pro/bin/sfx680en-US.res
144	libstore.so.3
141	/lib/libnss_files.so.2
138	/lib/librt.so.1
135	stoc/...uriproc.uno.so
134	/usr/lib/libjpeg.so.62.0.0
131	svtools/...fsstorage.uno.so
127	libjvmfwk.so.3
123	/usr/lib/libcups.so.2
108	stoc/...implreg.uno.so
103	fileaccess/...libfileacc.so
99	stoc/...nestedreg.uno.so
98	stoc/...simplereg.uno.so
96	/usr/X11R6/lib/libICE.so.6.3
95	configmgr/...sysmgr1.uno.so
91	/usr/lib/libsasl2.so.2.0.18
89	/opt/gnome/share/locale/en_GB/LC_MESSAGES/gtk20-properties.mo
83	/usr/X11R6/lib/libXft.so.2.1.1
80	/lib/libcrypt.so.1
77	bridges/...libgcc3_uno.so
70	i18nutil/...libi18nutilgcc3.so
69	/lib/libz.so.1.2.1
66	configmgr/...behelper.uno.so
66	/usr/X11R6/lib/libXext.so.6.4
59	stoc/...typeconverter.uno.so
57	dtrans/...libmcnttype.so
56	/usr/lib/liblber.so.199.3.4
53	/opt/gnome/lib/libpangox-1.0.so.0.400.1
52	shell/...localebe1.uno.so
51	/lib/libdl.so.2
50	/opt/gnome/lib/gtk-2.0/engines/libindustrial.so
47	svtools/unxlngi4.pro/bin/svt680en-US.res
43	stoc/...shlibloader.uno.so
39	/lib/libgcc_s.so.1
39	/usr/X11R6/lib/libXcursor.so.1.0.2
38	sj2/...libj680li_g.so
37	/usr/X11R6/lib/libSM.so.6.0
36	/opt/gnome/lib/memprof/libmemintercept.so
36	/usr/lib/libstartup-notification-1.so.0.0.0
34	/usr/X11R6/lib/libXi.so.6.0
33	/usr/X11R6/lib/libXrender.so.1.2.2
32	/opt/gnome/share/locale/en_GB/LC_MESSAGES/gtk20.mo
31	svx/unxlngi4.pro/bin/ofa680en-US.res
31	/usr/lib/libpopt.so.0.0.0
29	libportaudio.so.0.0.18
28	/opt/gnome/lib/libORBitCosNaming-2.so.0.0.0
23	libjvmaccessgcc3.so.3
22	libuno_salhelpergcc3.so.3
22	/opt/gnome/lib/libpangoxft-1.0.so.0.400.1
21	svx/unxlngi4.pro/bin/ooo680en-US.res
21	/usr/lib/gconv/gconv-modules.cache
20	/usr/X11R6/lib/libXxf86vm.so.1.0
18	/opt/gnome/lib/libgthread-2.0.so.0.400.6
13	vcl/unxlngi4.pro/bin/vcl680en-US.res
13	/usr/X11R6/lib/libXrandr.so.2.0
13	/opt/gnome/lib/libgmodule-2.0.so.0.400.6
12	/opt/OOInstall/program
11	desktop/unxlngi4.pro/bin/dkt680en-US.res
9	/opt/gnome/lib/pango/1.4.0/modules/pango-basic-fc.so
7	/usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
6	/usr/lib/gconv/ISO8859-1.so
2	/usr/lib/locale/en_GB.utf8/LC_TIME
1	/usr/share/locale/en_GB/LC_MESSAGES/libc.mo


** SDI Slots
    * sw:

007b2400 l     O .data  00001194              aSwBaseShellSlots_Impl
007b50a0 l     O .data  00001194              aSwDrawTextShellSlots_Impl
007b92c0 l     O .data  000039a8              aSwTextShellSlots_Impl
007c6920 l     O .data  000037c8              aSwWebTextShellSlots_Impl
007caf60 l     O .data  00001824              aSwWebViewSlots_Impl
007ccaa0 l     O .data  00001f2c              aSwViewSlots_Impl

    + looks like the .sdi slot info has a large cost ... ]

aSwBaseShellSlots_Impl eg.
    sw/swslots.hxx:
#define SFX_SLOTMAP_ARG(ShellClass) static SfxSlot __FAR_DATA a##ShellClass##Slots_Impl[] =
    + memory chew is:
	+ [SfxSlot]:
	    + 2+2+4+4+2+2+4+4+4+4+4+4+4+4+2+4+4
	    + == 5*2 + 12*4 = 58bytes [say 60 ;-]
	+ how many slots ?
	    + 1355 in swslots.hxx
		+ 81k
	    + Total -5111 == 306K
grep SFX_NEW_SLOT_ARG */unxlngi6.pro/inc/*slots*.hxx | wc -l
5111
#define SFX_ARGUMENTMAP(ShellClass) static SfxFormalArgument __FAR_DATA a##ShellClass##Args_Impl[] =
	+ SfxFormalArgument == 10bytes.
grep SFX_ARGUMENTMAP */unxlngi6.pro/inc/*slots*.hxx | wc -l
2396
	=> 24k


** libsvx - the bloat-king ...

    + Why / How could it possibly be so big ?
    + what of it isn't used much ?
	+ cutting code out is hard:
	+ if *something* in libsw needs it ...
	    + what is the solution ?
	    + yet more modularity ?
	    + UNO components ?

    + Can we have 'base' pieces in svx ?
	+ and impl. pieces elsewhere ?
	+ code break-down by directory size ...
	    + code size ? file size ?

$ cat > pat
*.src
$ du -b -X ./pat * | grep -v '/' | sort -n

6212    init
18199   gengal
22147   mnuctrls
32823   src
38283   svxlink
40565   intro
44856   stbctrls
51757   unogallery
66194   toolbars
100726  unodialogs
117713  svrtf
131409  xml
154090  options
173234  outliner
349369  gallery2
400116  unoedit
429906  tbxctrls
502922  fmcomp
508433  sdr
589702  customshapes
612951  xoutdev
678797  items
685524  unodraw
695427  accessibility
724752  engine3d
741794  inc
1066371 msfilter
1400303 editeng
1656212 form
2666721 svdraw
5410880 dialog

	+ it looks like most of the size is in dialog/

+ Can we split a load of code out of libraries ?
    + could we do 'clever' things in the linker ?
	+ 'in-another-shlib' feature ?
	    + everything not on startup - 'in another' ...
		+ or ... an 'LD_PRELOAD' full of stubs ?
    + want to hook XYZ ?
	+ fine to 'link' to it, as long as we don't 'use' it ...
	+ which of these dialogs are really used ?
	+ which are really important ?

*** Dialogs
    + if all the _application_ logic has split
      out 'abstract' dialogs
	+ eg. writer, calc etc.
	+ surely - we can now split the dialog bases out of svx ...
	    + do we win ? can we keep them out of startup ?
    + chop dialogs.lib & form.lib out:
	+ items, form, dialogs

*** If we can't pull out what is not used,
    *** Can we pull in what is used ?
	*** 'libsvx-startup.so' ? ... ;-)


+ Gun for [ both in libsvx core ]:

    + 'Form' logic - how much API does that expose ?
	+ looks somewhat uno-ized anyway ...

	+ Most of the form headers -appear- to be internal ...
	    + ... hmm ...
    + Dialog logic - ditto.

cui - what is that ?
    + cuiexp.obj
    + dlgfact.obj

Section size breakdown
 code            5207kb - 37%
 linking         1533kb - 11%
 exceptions      1107kb - 7.9%
 data             611kb - 4.4%
 data relocs      553kb -  4%
 debug            516kb - 3.7%
 versioning        39kb - 0.28%
 comment           27kb - 0.2%
 bss               13kb - 0.094%

    + lots of symbols ...

** Sound foo

    + Sound bits:
	+ bin libraries from search path
	+ size savings:
		330k - libsndfile.so.1.0.9
		29k - libportaudio.so.0.0.18
	+ framework's 'soundhandler' appears unused.
	    + no hits for 'SoundHandler' in *.so
	    + (except in QA project)
	+ sd needs a little work ...


Nasty:
    + debug why existing sound foo not working ...
    + add dummy for Sound::IsSoundFile [...]
	+ can we use avmedia ?
	+ should we move the audio stuff here ?
	+ WTF. is that being linked / used at startup ?
	    + it's a crazy thing ! ;-)
		+ [ helper code presumably ]
	+ avmedia needs a head-less player service
	    + it needs to work nicely ;-)
	    + needs to be able to detect media files ...


    Binary file libsd680li.so matches
	sd/source/ui/dlg/filedlg.cxx - IsSoundFile
	sd/source/ui/views/drviewse.cxx - 

    Binary file libsc680li.so matches - 'IsSoundFile'
	sc/source/ui/view/tabvwshg.cxx
    Binary file libsw680li.so matches - 'IsSoundFile'
	sw/source/ui/shells/textdrw.cxx - cut/paste 'DispatchURLInternal' [hmm]

Ok:
    Binary file libbasctl680li.so matches
    Binary file libsb680li.so matches
    Binary file libsts680li.so matches
    Binary file libsvt680li.so matches
    Binary file libvcl680li.so matches
    Binary file libsvx680li.so matches
    Binary file libfwk680li.so matches


** i18npool foo:

    + source/registerservices.cxx:
	+ registers loads of _ja etc. cruft.
	    + split into a 'western.so' ? - easy to do ...
	    + but where is the size data ? ...
		+ LocaleData ?
	+ The Localedata:
	    + source/localedata/
	    + pDLL
	    + 'getFunctionSymbolByName' etc.
		+ liblocaledata_en
		    + exports lots of symbols.
	    + *why*
		+ liblocaledata_others loaded ?
		+ -en- is way smaller ...

	    + hack registry / services foo ..

    + split out Asian bits ...
	+ copy svx/source/dialog/makefile.mk
	
	+ calc 'break-iterator' sizes ...
	    + generated OpenOffice_icu_dat.c stuff ?
	    + 'OpenOffice_dict_word_brk' etc.

00075840 l     O .rodata        000065f8              OpenOffice_dict_word_brk
0006f140 l     O .rodata        000066f8              OpenOffice_dict_word_hu_brk
0007be40 l     O .rodata        00006f80              OpenOffice_edit_word_brk
000610e0 l     O .rodata        00007ec8              OpenOffice_count_word_brk
00082dc0 l     O .rodata        0000ac70              OpenOffice_line_brk
00068fc0 l     O .rodata        00006180              OpenOffice_dict_word_ca_brk

Binary file OpenOffice_dict_word_brk.o matches
Binary file OpenOffice_icu_dat.o matches


+ The com.sun.star.i18n.IndexEntrySupplier
	+ not used at startup / in euro locales [ apparently ]
+ i18n.TextConversion
	+ ditto ...


+ Why - no i18n services activated ?
    + or are they ?

What we load on startup:

'com.sun.star.i18n.BreakIterator'
'com.sun.star.i18n.BreakIterator_en'
'com.sun.star.i18n.BreakIterator_en_US'
'com.sun.star.i18n.BreakIterator_Unicode'
'com.sun.star.i18n.Calendar_gregorian'
'com.sun.star.i18n.CharacterClassification'
'com.sun.star.i18n.CharacterClassification_en'
'com.sun.star.i18n.CharacterClassification_en_US'
'com.sun.star.i18n.CharacterClassification_Unicode'
'com.sun.star.i18n.Collator'
'com.sun.star.i18n.Collator_alphanumeric'
'com.sun.star.i18n.Collator_en_alphanumeric'
'com.sun.star.i18n.Collator_en_US_alphanumeric'
'com.sun.star.i18n.Collator_Unicode'
'com.sun.star.i18n.LocaleCalendar'
'com.sun.star.i18n.LocaleData'
'com.sun.star.i18n.NumberFormatMapper'
'com.sun.star.i18n.Transliteration'

'IndexEntry' - unused ...

+ Collator - interface bits.
+ LocaleData - interface bits.


i#57229

31770 write(2, "CreateInstanceWithContext \'com.sun.star.i18n.Transliteration\'\n", 62) = 62
31770 write(2, "CreateInstanceWithContext \'com.sun.star.loader.SharedLibrary\'\n", 62) = 62
31770 write(2, "CreateInstanceWithContext \'com.sun.star.i18n.LocaleData\'\n", 57) = 57
31770 mmap2(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x46abf000
31770 mmap2(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x46acf000
31770 mmap2(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x46adf000
31770 mmap2(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x46aef000
31770 mmap2(NULL, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x46aff000
31770 write(2, "CreateInstanceWithContext \'com.sun.star.loader.SharedLibrary\'\n", 62) = 62
31770 write(2, "CreateInstanceWithContext \'com.sun.star.loader.SharedLibrary\'\n", 62) = 62
31770 open("./tls/i686/sse2/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./tls/i686/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./tls/sse2/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./tls/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./i686/sse2/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./i686/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./sse2/libi18npool_asian.uno.so", O_RDONLY) = -1 ENOENT (No such file or directory)
31770 open("./libi18npool_asian.uno.so", O_RDONLY) = 34
31770 read(34, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\251\1\0004\0\0\0\0\225/\0\0\0\0\0004\0 \0\5\0(\0\"\0\37\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\370\201\36\0\370\201\36\0\5\0\0\0\0\20\0\0\1\0\0\0\370\201\36\0\370\221\36\0\370\221\36\0\30\0\21\0p!\21\0\6\0\0\0\0\20\0\0\2\0\0\0\220\210\36\0\220\230\36\0\220\230\36\0H\1\0\0H\1\0\0\6\0\0\0\4\0\0\0P\345td\34\310\35\0\34\310\35\0\34\310\35\0004\34\0\0004\34\0\0\4\0\0\0\4\0\0\0Q\345td\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\4\0\0\0\257\3\0\0\354\1\0\0"..., 512) = 512
31770 fstat64(34, {st_mode=S_IFREG|0755, st_size=3327460, ...}) = 0


#0  0x408824c7 in cppu::loadSharedLibComponentFactory () from ./libuno_cppuhelpergcc3.so.3
#1  0x42077ff3 in component_getFactory () from /nld/suse-opt/OOInstall.normal/program/shlibloader.uno.so
#2  0x4087b828 in cppu::ORegistryFactoryHelper::createModuleFactory () from ./libuno_cppuhelpergcc3.so.3
#3  0x4087bcb5 in cppu::ORegistryFactoryHelper::createInstanceEveryTime () from ./libuno_cppuhelpergcc3.so.3
#4  0x4087a24f in cppu::OSingleFactoryHelper::createInstanceWithContext () from ./libuno_cppuhelpergcc3.so.3
#5  0x4087a307 in cppu::OFactoryComponentHelper::createInstanceWithContext () from ./libuno_cppuhelpergcc3.so.3
#6  0x4087a486 in cppu::OSingleFactoryHelper::createInstance () from ./libuno_cppuhelpergcc3.so.3
#7  0x4087a55d in cppu::OFactoryComponentHelper::createInstance () from ./libuno_cppuhelpergcc3.so.3
#8  0x45688bd9 in loadBody (xSMgr=@0x46abc184, implName=@0xbf8be3a8, body=@0x46abc118)
    at /nld/opt/suse-OpenOffice/src680-m133/i18npool/source/transliteration/transliterationImpl.cxx:612
#9  0x45688e74 in com::sun::star::i18n::TransliterationImpl::loadModuleByName (this=0x46abc0f8, implName=@0xbf8be3ec, body=@0x46abc118, 
    rLocale=@0x46abbd80) at /nld/opt/suse-OpenOffice/src680-m133/i18npool/source/transliteration/transliterationImpl.cxx:632
#10 0x45686c01 in com::sun::star::i18n::TransliterationImpl::loadModule (this=0x46abc0f8, modType=1280, rLocale=@0x46abbd80)
    at /nld/opt/suse-OpenOffice/src680-m133/i18npool/source/transliteration/transliterationImpl.cxx:216
#11 0x40647421 in utl::TransliterationWrapper::loadModuleImpl () from ./libutl680li.so
#12 0x40647545 in utl::TransliterationWrapper::loadModuleIfNeeded () from ./libutl680li.so
#13 0x400a0785 in vcl::I18nHelper::~I18nHelper () from ./libvcl680li.so
#14 0x400a0905 in vcl::I18nHelper::MatchString () from ./libvcl680li.so


** VM wasteage **
	+ pthread_attr_set_stacksize (&attr, stack_size);
		+ pthread_create (&attr) etc...
	    + sal/osl/unx/thread.c - 

static gulong g_thread_min_stack_size = 0;

#ifdef _SC_THREAD_STACK_MIN
  g_thread_min_stack_size = MAX (sysconf (_SC_THREAD_STACK_MIN), 0);
#endif /* _SC_THREAD_STACK_MIN */

#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
  if (stack_size)
    {
      stack_size = MAX (g_thread_min_stack_size, stack_size);
      /* No error check here, because some systems can't do it and
       * we simply don't want threads to fail because of that. */
      pthread_attr_setstacksize (&attr, stack_size);
    }
#endif /* HAVE_PTHREAD_ATTR_SETSTACKSIZE */

       Target threads:
       + need a 'push-policy' type thing ...
	    + push-thread-stack-policy, pop-thread-stack-policy...
**            desktop::OfficeIPCThread::run ()
		    + desktop/source/app/officeipcthread.hxx
			vos::OThread ...
			pThread->create() etc.
**	      X11SalInstance::CreateSalSession ()
		    + vcl/unx/source/app/sm.cxx /osl_createSuspendedThread/
	      vos::OTimerManager::run ()
		    + looks like a mess ...
		    + 'onShot' could do anything => do not shrink stack

#0  0x41000fb8 in poll () from /lib/tls/libc.so.6
#1  0x441894e8 in ?? () from ./libdtransX11680li.so
#2  0x441895af in ?? () from ./libdtransX11680li.so
#3  0x408e2ea4 in osl_thread_start_Impl () from ./libuno_sal.so.3
#4  0x40d6c107 in start_thread () from /lib/tls/libpthread.so.0
	    + where does this thread come from ?

+ ImpEditEngine
    + how many of these do we have ?
    + loads of wasted non-bitfield sal_Bools ...



PMap command:
    + pmap `ps ax | grep soffice | grep -v ps | sed 's/pts.*//'` | tail -n 3

Before:
Total:   155044K  54952K  15700K
65660K writable-private, 74776K readonly-private, and 14608K shared

After:
Total:   131224K  55020K  15720K
41840K writable-private, 74776K readonly-private, and 14608K shared


~600k ?
OMultiTypeInterfaceContainer
    + cppuhelper/source/ ... has a hash ...

250k ?
vcl's: FtFontInfo
    vcl/source/glyphs/gcach_ftyp.hxx
	[ allocate idly ? ]


_hash_map.h:
  hash_map() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}

_hashtable.h:
  hashtable(size_type __n,
..
  {
    _M_initialize_buckets(__n);
  }

  void _M_initialize_buckets(size_type __n)
  {
    const size_type __n_buckets = _M_next_size(__n);
    _M_buckets.reserve(__n_buckets);
    _M_buckets.insert(_M_buckets.end(), __n_buckets, (void*) 0);
    _M_num_elements._M_data = 0;
  }

# define __PRIME_LIST_BODY { \
  53ul,         97ul,         193ul ...

    so - either 97 entries, or 193 - prolly the latter.

    ** The -Smallest- hash is 53 items **

    [ can calc from saving (?) ;-] 

OMulti.log ...

41832K writable-private, 74920K readonly-private, and 14608K shared
41820K writable-private, 74920K readonly-private, and 14608K shared

after:

41336K writable-private, 74920K readonly-private, and 14608K shared
41332K writable-private, 74920K readonly-private, and 14608K shared


* FtFontInfo
    + constructor - very bad. 251672 ...

'Create new Font Info: 162'
'Created hashes for' - only 1 font on startup of writer.

Saves 2*192*162*4 bytes = 250kb.

* fontcfg.cxx:

before:

41816K writable-private, 74920K readonly-private, and 14608K shared
41812K writable-private, 74920K readonly-private, and 14608K shared

after:

41228K writable-private, 74920K readonly-private, and 14608K shared
41224K writable-private, 74920K readonly-private, and 14608K shared


** Catching bad behavior ...

    + add a 'match string with XYZ' in the strtmpl.c code
	+ breakpoint on XYZ string.

** ConfigMgr:

    + wastage - adding 8 string back-comparison check,
      no performance impact:

before ...

001271 1 } PERFORMANCE - DesktopOpenClients_Impl()
001304 1 } PERFORMANCE - DesktopOpenClients_Impl()
001363 1 } PERFORMANCE - DesktopOpenClients_Impl()
001338 1 } PERFORMANCE - DesktopOpenClients_Impl()
001300 1 } PERFORMANCE - DesktopOpenClients_Impl()

after:

001266 1 } PERFORMANCE - DesktopOpenClients_Impl()
001300 1 } PERFORMANCE - DesktopOpenClients_Impl()
001336 1 } PERFORMANCE - DesktopOpenClients_Impl()
001309 1 } PERFORMANCE - DesktopOpenClients_Impl()

       + however - strings still duplicated - somewhere - :-)

* This is amazing: same/same but different ... 

#0  __fscanf (stream=0xb6f2b440, format=0xb7457028 "") at fscanf.c:31
#1  0xb743ea22 in checkFor (pStr=0xb1335698) at strtmpl.c:108
#2  0xb7441c61 in rtl_string2UString (ppThis=0xb1c4a000, pStr=0xb3571b96 "", nLen=0, eTextEncoding=11, nCvtFlags=819) at ustring.c:620
#3  0xb3554b6d in rtl::OUString::OUString () from ./libfilterconfig1.so
#4  0xb3561535 in filter::config::FilterCache::impl_readPatchUINames () from ./libfilterconfig1.so
#5  0xb3562a0e in filter::config::FilterCache::impl_loadItem () from ./libfilterconfig1.so
#6  0xb3562eca in filter::config::FilterCache::impl_loadSet () from ./libfilterconfig1.so
#7  0xb35630d7 in filter::config::FilterCache::impl_load () from ./libfilterconfig1.so
#8  0xb3563504 in filter::config::FilterCache::load () from ./libfilterconfig1.so
#9  0xb356adf3 in filter::config::LateInitThread::run () from ./libfilterconfig1.so
#10 0xb356a7c9 in threadFunc () from ./libfilterconfig1.so
#11 0xb742a068 in osl_thread_start_Impl () from ./libuno_sal.so.3
#12 0xb710b1db in start_thread (arg=0xb1c4aba0) at pthread_create.c:306
#13 0xb6ecb9ee in clone () from /lib/libc.so.6


before:
41076K writable-private, 73560K readonly-private, and 14608K shared
41080K writable-private, 73560K readonly-private, and 14608K shared
41084K writable-private, 73560K readonly-private, and 14608K shared
after:
40936K writable-private, 73552K readonly-private, and 14608K shared
40812K writable-private, 73548K readonly-private, and 14608K shared
40924K writable-private, 73552K readonly-private, and 14608K shared

140k - saved.

* 'Type':

#0  __fscanf (stream=0xb6f6d440, format=0xb7499048 "") at fscanf.c:31
#1  0xb7480a3b in checkFor (pStr=0x8121058) at strtmpl.c:109
#2  0xb7483a98 in rtl_string2UString (ppThis=0xbfad4770, pStr=0x811b586 "", nLen=0, eTextEncoding=76, nCvtFlags=819) at ustring.c:555
#3  0xb5c4eb03 in typereg_reader_getFieldName () from ./libreg.so.3
#4  0xb50d99f6 in typereg::Reader::getFieldName () from /data/OODInstall/program/regtypeprov.uno.so
#5  0xb50db974 in stoc_rdbtdp::CompoundTypeDescriptionImpl::getMemberNames () from /data/OODInstall/program/regtypeprov.uno.so
#6  0xb50e7f02 in stoc::registry_tdprovider::StructTypeDescription::getMemberNames () from /data/OODInstall/program/regtypeprov.uno.so
#7  0xb7668d71 in cppu::installTypeDescriptionManager () from ./libuno_cppuhelpergcc3.so.3

or:
* (gdb) bt 10
#0  __fscanf (stream=0xb6f6d440, format=0xb7499048 "") at fscanf.c:31
#1  0xb7480a3b in checkFor (pStr=0x85c4fe0) at strtmpl.c:109
#2  0xb7482290 in rtl_uString_newFromStr_WithLength (ppThis=0xbfad4610, pCharStr=0x85ad4e0, nLen=4) at strtmpl.c:1268
#3  0xb4e5cdd0 in rtl::OUString::copy (this=0xbfad4644, beginIndex=0, count=4) at /opt/OpenOffice/ood680-m1/solver/680/unxlngi6.pro/inc/rtl/ustring.hxx:866
#4  0xb4f3c043 in configmgr::configuration::(anonymous namespace)::implSplitCompositeName (_aCompositeName=@0xbfad46dc, _rBaseName=@0xbfad4694, 
    _rPredicate=@0xbfad4698) at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/configpath.cxx:948
#5  0xb4f3c5f6 in configmgr::configuration::Path::Component::getName (this=0xbfad46dc)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/configpath.cxx:256
#6  0xb4f76511 in configmgr::configuration::TreeImpl::getSimpleRootName (this=0x85a8ea0)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/treeimpl.cxx:585
#7  0xb4f6a51e in validatedName (aTree=@0xbfad47dc) at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/setnodeimpl.cxx:182
#8  0xb4f6d0cc in configmgr::configuration::SetNodeImpl::implInitElement (this=0x85ca5a0, aNewElement=@0xbfad47dc)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/setnodeimpl.cxx:855
#9  0xb4f6d387 in configmgr::configuration::SetNodeImpl::implInitElements (this=0x85ca5a0, _aNode=@0xbfad4844, nDepth=4294967295)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/setnodeimpl.cxx:842
...
#1  0xb7480a3b in checkFor (pStr=0x85c4aa0) at strtmpl.c:109
#2  0xb7482290 in rtl_uString_newFromStr_WithLength (ppThis=0xbfad4610, pCharStr=0x85ab3c8, nLen=4) at strtmpl.c:1268
#3  0xb4e5cdd0 in rtl::OUString::copy (this=0xbfad4644, beginIndex=0, count=4) at /opt/OpenOffice/ood680-m1/solver/680/unxlngi6.pro/inc/rtl/ustring.hxx:866
#4  0xb4f3c043 in configmgr::configuration::(anonymous namespace)::implSplitCompositeName (_aCompositeName=@0xbfad46dc, _rBaseName=@0xbfad4694, 
    _rPredicate=@0xbfad4698) at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/configpath.cxx:948
#5  0xb4f3c5f6 in configmgr::configuration::Path::Component::getName (this=0xbfad46dc)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/configpath.cxx:256
#6  0xb4f76511 in configmgr::configuration::TreeImpl::getSimpleRootName (this=0x85ae7c8)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/treeimpl.cxx:585
#7  0xb4f76585 in configmgr::configuration::TreeImpl::getSimpleNodeName (this=0x85ae7c8, nNode=1)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/treeimpl.cxx:577
#8  0xb4f5db04 in configmgr::configuration::Tree::getName (this=0xbfad47d0, aNode=@0xbfad47c8)
    at /data/OpenOffice/ood680-m1/configmgr/source/treemgr/noderef.cxx:501
#9  0xb4fe0064 in configmgr::configapi::CollectNodeNames::handle (this=0xbfad4998, aTree=@0xbfad47d0, aNode=@0xbfad47c8)
    at /data/OpenOffice/ood680-m1/configmgr/source/api2/treeiterators.cxx:60

... would you believe it - the Framework code ! :-) ...

#0  __fscanf (stream=0xb6f6d440, format=0xb7499048 "") at fscanf.c:31
#1  0xb7480a3b in checkFor (pStr=0x87ccbf8) at strtmpl.c:109
#2  0xb7483c7a in rtl_string2UString (ppThis=0xbfad3694, pStr=0xb3d9cfa7 "", nLen=0, eTextEncoding=11, nCvtFlags=819) at ustring.c:620
#3  0xb3d6b783 in rtl::OUString::OUString () from ./libfwe680li.so
#4  0xb3d74bfe in framework::OReadMenuPopupHandler::startElement () from ./libfwe680li.so
#5  0xb3d72a3b in framework::OReadMenuHandler::startElement () from ./libfwe680li.so
#6  0xb3d72b9e in framework::OReadMenuBarHandler::startElement () from ./libfwe680li.so
#7  0xb3d72421 in framework::OReadMenuDocumentHandler::startElement () from ./libfwe680li.so
#8  0xb3d76037 in framework::SaxNamespaceFilter::startElement () from ./libfwe680li.so
#9  0xb4d360dc in sax_expatwrap::SaxExpatParser_Impl::callbackStartElement () from ./sax.uno.so
#10 0xb4d36213 in call_callbackStartElement () from ./sax.uno.so
#11 0xb5ee2fef in XML_ParserCreate () from /usr/lib/libexpat.so.1
#12 0xb5ee3e2d in XML_ParserCreate () from /usr/lib/libexpat.so.1
#13 0xb5ee4ee4 in XML_ParserCreate () from /usr/lib/libexpat.so.1
#14 0xb5ee5db5 in XML_ParserCreate () from /usr/lib/libexpat.so.1
#15 0xb5edd62b in XML_ParseBuffer () from /usr/lib/libexpat.so.1
#16 0xb5ee6292 in XML_Parse () from /usr/lib/libexpat.so.1
#17 0xb4d346ce in sax_expatwrap::SaxExpatParser_Impl::parse () from ./sax.uno.so
#18 0xb4d34f6c in sax_expatwrap::SaxExpatParser::parseStream () from ./sax.uno.so
#19 0xb3d712c1 in framework::MenuConfiguration::CreateMenuBarConfigurationFromXML () from ./libfwe680li.so
#20 0xb3ad5db9 in framework::ModuleUIConfigurationManager::impl_requestUIElementData () from ./libfwk680li.so
#21 0xb3ad6ee3 in framework::ModuleUIConfigurationManager::impl_findUIElementData () from ./libfwk680li.so
#22 0xb3ad7ca4 in framework::ModuleUIConfigurationManager::getSettings () from ./libfwk680li.so
#23 0xb3ab092e in framework::MenuBarWrapper::initialize () from ./libfwk680li.so
#24 0xb3adb888 in framework::MenuBarFactory::createUIElement () from ./libfwk680li.so
#25 0xb3ab6a34 in framework::UIElementFactoryManager::createUIElement () from ./libfwk680li.so
#26 0xb3a98817 in framework::LayoutManager::implts_createElement () from ./libfwk680li.so
#27 0xb3a98e22 in framework::LayoutManager::createElement () from ./libfwk680li.so

incidence Name                   size	wasted
~350      Type                     16   5584
548       UIName                   20  10940
368       CommandURL               28  10276
351       HelpURL                  22   7700
347       Label                    18   6228
281       ItemDescriptorContainer  54  15120
                                Total 55,848

** Config Mgr - Urgh [!?]

// not these guys:
source/backendhelper/backendlayerhelper.cxx:		rtl::OUString aName = aPropInfo.Name.getToken(0, '/',nNextToken);
source/backendhelper/backendlayerhelper.cxx:	rtl::OUString aName = aPropertyInfos[0].Name.getToken(0, '/',nNextToken);

source/xml/elementformatter.cxx:			    OUString aNodeName = _aName.copy(nIndex + 1);
source/xml/elementformatter.cxx:		            OUString aPackage = _aName.copy(0, nIndex);
source/treemgr/templateimpl.cxx:	OUString sTypeName = aName.toString();

* We need to chase eg. 'LabelType' here

0  __fscanf (stream=0xb6fca440, format=0xb74f6028 "") at fscanf.c:31
#1  0xb74dda22 in checkFor (pStr=0x85c9da0) at strtmpl.c:108
#2  0xb74df277 in rtl_uString_newFromStr_WithLength (ppThis=0xbfaf3d30, pCharStr=0x85b575c, nLen=6) at strtmpl.c:1267
#3  0xb4fc9c12 in rtl::OUString::OUString () from ./configmgr2.uno.so
#4  0xb50791a8 in configmgr::sharable::readString () from ./configmgr2.uno.so
#5  0xb507c649 in configmgr::sharable::NodeInfo::getName () from ./configmgr2.uno.so
#6  0xb5037930 in configmgr::data::SetNodeAccess::getName () from ./configmgr2.uno.so
#7  0xb5036a48 in configmgr::configuration::TreeImplBuilder::addSet () from ./configmgr2.uno.so
#8  0xb5036b1e in configmgr::configuration::TreeImplBuilder::handle () from ./configmgr2.uno.so
#9  0xb507d830 in configmgr::data::NodeVisitor::Dispatcher::dispatch () from ./configmgr2.uno.so


 pmap `ps ax | grep soffice | grep -v ps | sed 's/pts.*//'` | tail -n 1

before:

40688K writable-private, 74536K readonly-private, and 14608K shared
40728K writable-private, 75428K readonly-private, and 14608K shared
40592K writable-private, 74536K readonly-private, and 14608K shared

after:

40348K writable-private, 75244K readonly-private, and 14608K shared
40408K writable-private, 75428K readonly-private, and 14608K shared
40360K writable-private, 75376K readonly-private, and 14608K shared


** Filter code:
      5 writer_AportisDoc_PalmDB_File
      5 writer_DocBook_File
      5 writer_Lotus_1_2_3_10_DOS_StarWriter
      5 writer_Lotus_1_2_3_10_WIN_StarWriter
      5 writer_LotusWordPro_Document
      5 writer_MS_WinWord_5
      5 writer_MS_WinWord_60
      8 writer8_template
      8 writer_globaldocument_StarOffice_XML_Writer_GlobalDocument
      8 writer_JustSystem_Ichitaro_10
      8 writer_JustSystem_Ichitaro_10_template
      8 writer_MIZI_Hwp_97
     12 com.sun.star.comp.Writer.XmlFilterAdaptor
     12 com.sun.star.frame.StartModule
     12 com.sun.star.script.BasicIDE
     12 com.sun.star.sdb.DataSourceBrowser
     12 com.sun.star.sdb.QueryDesign
     12 com.sun.star.sdb.RelationDesign
    108 UIOrder
    109 ClipboardFormat
    109 Preferred
    109 URLPattern
    166 FileFormatVersion
    167 FilterService
    167 UIComponent
    169 DocumentService
    169 UserData
    175 TemplateName
    501 x-default - (xml:lang attribute)
    + 


configmgr: use ustring stuff...

before:

40788K writable-private, 73644K readonly-private, and 15032K shared
40856K writable-private, 73644K readonly-private, and 15032K shared
40868K writable-private, 73644K readonly-private, and 15032K shared
40852K writable-private, 73644K readonly-private, and 15032K shared
40860K writable-private, 73644K readonly-private, and 15032K shared

memprof: 10576000, 10579000, 10577000 = 10577000

after:

39880K writable-private, 74620K readonly-private, and 15032K shared
39876K writable-private, 74620K readonly-private, and 15032K shared
31692K writable-private, 74616K readonly-private, and 15032K shared
31820K writable-private, 74616K readonly-private, and 15032K shared
31700K writable-private, 74616K readonly-private, and 15032K shared

memprof: 9742000, 9742000, 9742000  - avg. 9742000

Saving = 7% of memory, >800k

re-worked configmgr piece [ multi-cache ]:

saved readName 'Properties'
Saved 30977 strings 880646 bytes
saved readName 'cfg:localized'



* configmgr::Subtree::addChild(INode *)

* where do these come from:
    110 cfg:value
    112 cfg:any
    285 cfg:localized
    286 cfg:string

#21 0xb7e26b84 in vcl::DefaultFontConfiguration::DefaultFontConfiguration () from ./libvcl680li.so
#22 0xb7e26ef3 in vcl::DefaultFontConfiguration::get () from ./libvcl680li.so


* share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_impressgraphics_filters.xcu:
  <value xml:lang="x-default">BMP - Windows Bitmap</value>


1  0xb74d62e6 in breakPoint () from ./libuno_sal.so.3
#2  0xb74d72b6 in rtl_uString_newFromStr () from ./libuno_sal.so.3
#3  0xa3ce4c03 in OUString (this=0xbfd77efc, value=0x814dd20) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ustring.hxx:168
#4  0xa3dbed29 in configmgr::sharable::SetNode::allocTemplateData (_anAllocator=@0xbfd77f30, pName=0x814dd20, pModule=0x811c218)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/node.cxx:240
#5  0xa3dba933 in configmgr::data::ConvertingDataTreeBuilder::makeTemplateData (this=0xbfd78034, _aTemplateName=@0x8145f9c, _aTemplateModule=@0x8145fa0)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:1010
#6  0xa3dbb93c in configmgr::data::ConvertingDataTreeBuilder::handle (this=0xbfd78034, _aNode=@0x8145f88)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:895
#7  0xa3dcf1af in configmgr::ISubtree::dispatch (this=0x8145f88, anAction=@0xbfd78034) at ../inc/valuenode.hxx:230
#8  0xa3c8037b in configmgr::NodeAction::applyToNode (this=0xbfd78034, aNode=@0x8145f88) at ../inc/valuenode.hxx:316
#9  0xa3dbc09c in configmgr::data::ConvertingDataTreeBuilder::buildElement (this=0xbfd78034, _aNode=@0x8145f88, _aTypeName=@0xbfd7813c, _bWithDefaults=true)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:867
#10 0xa3dbc128 in configmgr::data::ConvertingDataTreeBuilder::ElementListBuilder::handleNode (this=0xbfd78130, _aSourceNode=@0x8145f88)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:1032
#11 0xa3dbc19e in configmgr::data::ConvertingDataTreeBuilder::ElementListBuilder::handle (this=0xbfd78130, _aSourceNode=@0x8145f88)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:1046
#12 0xa3dcf1af in configmgr::ISubtree::dispatch (this=0x8145f88, anAction=@0xbfd78130) at ../inc/valuenode.hxx:230
#13 0xa3dce680 in configmgr::Subtree::forEachChild (this=0x8146340, anAction=@0xbfd78130) at /data/OpenOffice/ood680-m4/configmgr/source/tree/cmtree.cxx:298
#14 0xa3c8039d in configmgr::NodeAction::applyToChildren (this=0xbfd78130, aSubtree=@0x8146340) at ../inc/valuenode.hxx:318
#15 0xa3dba8b9 in configmgr::data::ConvertingDataTreeBuilder::ElementListBuilder::buildElementList (this=0xbfd78130, _aSet=@0x8146340, _bWithDefaults=true)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:1023
#16 0xa3dbba22 in configmgr::data::ConvertingDataTreeBuilder::handle (this=0xbfd782a4, _aNode=@0x8146340)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:902
#17 0xa3dcf1af in configmgr::ISubtree::dispatch (this=0x8146340, anAction=@0xbfd782a4) at ../inc/valuenode.hxx:230
#18 0xa3dce680 in configmgr::Subtree::forEachChild (this=0x814ae18, anAction=@0xbfd782a4) at /data/OpenOffice/ood680-m4/configmgr/source/tree/cmtree.cxx:298
#19 0xa3c8039d in configmgr::NodeAction::applyToChildren (this=0xbfd782a4, aSubtree=@0x814ae18) at ../inc/valuenode.hxx:318
#20 0xa3dbba94 in configmgr::data::ConvertingDataTreeBuilder::handle (this=0xbfd782a4, _aNode=@0x814ae18)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:907
#21 0xa3dcf1af in configmgr::ISubtree::dispatch (this=0x814ae18, anAction=@0xbfd782a4) at ../inc/valuenode.hxx:230
#22 0xa3c8037b in configmgr::NodeAction::applyToNode (this=0xbfd782a4, aNode=@0x814ae18) at ../inc/valuenode.hxx:316
#23 0xa3dbbefe in configmgr::data::ConvertingDataTreeBuilder::buildTree (this=0xbfd782a4, _aTreeName=@0x814ae1c, _aNode=@0x814ae18, _bWithDefaults=true)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:882
#24 0xa3dbbf7b in configmgr::data::buildTree (_aTargetMemory=@0xbfd78450, _aTreeName=@0x814ae1c, _aNode=@0x814ae18, _bWithDefaults=true)
    at /data/OpenOffice/ood680-m4/configmgr/source/tree/builddata.cxx:449
#25 0xa3c320a9 in configmgr::CacheLine::setComponentData (this=0x814c528, _aAccessToken=@0xbfd78450, _aComponentInstance=@0xbfd78390, _bWithDefaults=true)
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.cxx:227
#26 0xa3c2ccfc in configmgr::ExtendedCacheData::addComponentData (this=0x80d7d54, _aUpdateToken=@0xbfd78450, _aComponentInstance=@0x81c7728, 
    _bWithDefaults=true) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:503
#27 0xa3c27fb8 in configmgr::CacheLoadingAccess::addComponentData (this=0x80d7d48, _aAccessToken=@0xbfd78450, _aComponentInstance=@0x81c7728, 
    _bIncludesDefaults=true) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheaccess.cxx:341
#28 0xa3c3ac58 in configmgr::backend::CacheController::loadComponent (this=0x810f5e0, _aRequest=@0xbfd78508)
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:459
#29 0xa3c4328a in configmgr::TreeManager::requestSubtree (this=0x810fe10, aSubtreePath=@0xbfd78650, _aOptions=@0xbfd786c0)
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/treemanager.cxx:344
#30 0xa3d559c1 in configmgr::OProviderImpl::requestSubtree (this=0x80eca48, aSubtreePath=@0xbfd78650, _aOptions=@0xbfd786c0)
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:428
#31 0xa3d56192 in configmgr::OProviderImpl::buildReadAccess (this=0x80eca48, _rAccessor=@0xbfd786d8, _aOptions=@0xbfd786c0, nMinLevels=-1)
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:581
#32 0xa3d5bbad in configmgr::OConfigurationProviderImpl::createReadAccess (this=0x80eca48, aArgs=@0xbfd787d4)
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/confproviderimpl2.cxx:108
#33 0xa3d58e2e in configmgr::OConfigurationProvider::createInstanceWithArguments (this=0x80ec2c8, aServiceSpecifier=@0xbfd787f8, aArguments=@0xbfd787d4)
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/confprovider2.cxx:364
#34 0xb7e2eb84 in vcl::DefaultFontConfiguration::DefaultFontConfiguration () from ./libvcl680li.so

      3 iname: 'cfg:string-list'
      3 iname: 'ContentHandler'
      3 iname: 'ControllerType'
      3 iname: 'FrameLoader'
      3 iname: 'HistoryType'
      3 iname: 'MenuType'
      4 iname: 'LabelType'
      4 iname: 'MenuItem'
     25 iname: 'MultiPath'
     64 iname: 'cfg:any'
   2576 iname: 'cfg:string'

* Next '.uno' strings ...

grep '\.uno:' /tmp/strlog8-sorted | wc -l
1134

#0  __fscanf (stream=0xb6f86440, format=0xb74aad26 "") at fscanf.c:31
#1  0xb74992c9 in breakPoint () from ./libuno_sal.so.3
#2  0xb7499e1e in rtl_string2UString () from ./libuno_sal.so.3
#3  0xa3abc245 in rtl::OUString::OUString () from ./sax.uno.so
#4  0xa3abb00a in sax_expatwrap::SaxExpatParser_Impl::callbackStartElement () from ./sax.uno.so
#5  0xa3abb213 in call_callbackStartElement () from ./sax.uno.so
#6  0xb5b62e28 in doContent (parser=0x86dc2a0, startTagLevel=0, enc=0xb5bb5320, 
    s=0x86e136c "<menu:menuitem menu:id=\".uno:Undo\"/>\n\t\t\t<menu:menuitem menu:id=\".uno:Redo\"/>\n\t\t\t<menu:menuitem menu:id=\".uno:Repeat\"/>\n\t\t\t<menu:menuseparator/>\n\t\t\t<menu:menuitem menu:id=\".uno:Cut\"/>\n\t\t\t<menu:menuitem"..., end=0x86e4a80 "\216He\003\021\004", nextPtr=0x86dc2b8, 
    haveMore=1 '\001') at lib/xmlparse.c:2366
#7  0xb5b6246c in contentProcessor (parser=0x86dc2a0, start=0xb6f8685c "@d%Gï¿½%@d%Gï¿½%@200e%Gï¿½%@, end=0xb6f8685c "@d%Gï¿½%@d%Gï¿½%@200e%Gï¿½%@, endPtr=0xb6f8685c)
    at lib/xmlparse.c:2002
#8  0xb5b6503c in doProlog (parser=0x86dc2a0, enc=0xb5bb5320, 
    s=0x86e0aa7 "<menu:menubar xmlns:menu=\"http://openoffice.org/2001/menu\" menu:id=\"menubar\">\n\t<menu:menu menu:id=\".uno:PickList\">\n\t\t<menu:menupopup>\n\t\t\t<menu:menuitem menu:id=\".uno:AddDirect\"/>\n\t\t\t<menu:menuitem men"..., end=0x86e4a80 "\216He\003\021\004", tok=29, 
    next=0x86e0aa7 "<menu:menubar xmlns:menu=\"http://openoffice.org/2001/menu\" menu:id=\"menubar\">\n\t<menu:menu menu:id=\".uno:PickList\">\n\t\t<menu:menupopup>\n\t\t\t<menu:menuitem menu:id=\".uno:AddDirect\"/>\n\t\t\t<menu:menuitem men"..., nextPtr=0x86dc2b8, haveMore=1 '\001') at lib/xmlparse.c:3803
#9  0xb5b64e51 in prologProcessor (parser=0x86dc2a0, 
    s=0x86e0a80 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<menu:menubar xmlns:menu=\"http://openoffice.org/2001/menu\" menu:id=\"menubar\">\n\t<menu:menu menu:id=\".uno:PickList\">\n\t\t<menu:menupopup>\n\t\t\t<menu:menuitem menu:id=\""..., end=0x86e4a80 "\216He\003\021\004", nextPtr=0x86e7de0)
    at lib/xmlparse.c:3551
#10 0xb5b61c56 in XML_ParseBuffer (parser=0x86dc2a0, len=16384, isFinal=0) at lib/xmlparse.c:1562
#11 0xa3ab96ce in sax_expatwrap::SaxExpatParser_Impl::parse () from ./sax.uno.so
#12 0xa3ab9f6c in sax_expatwrap::SaxExpatParser::parseStream () from ./sax.uno.so
#13 0xa2afc381 in framework::MenuConfiguration::CreateMenuBarConfigurationFromXML () from ./libfwe680li.so
#14 0xa285fdb9 in framework::ModuleUIConfigurationManager::impl_requestUIElementData () from ./libfwk680li.so
#15 0xa2860ee3 in framework::ModuleUIConfigurationManager::impl_findUIElementData () from ./libfwk680li.so
#16 0xa2861ca4 in framework::ModuleUIConfigurationManager::getSettings () from ./libfwk680li.so
#17 0xa283a92e in framework::MenuBarWrapper::initialize () from ./libfwk680li.so
#18 0xa2865888 in framework::MenuBarFactory::createUIElement () from ./libfwk680li.so
#19 0xa2840a34 in framework::UIElementFactoryManager::createUIElement () from ./libfwk680li.so
#20 0xa2822817 in framework::LayoutManager::implts_createElement () from ./libfwk680li.so
#21 0xa2822e22 in framework::LayoutManager::createElement () from ./libfwk680li.so

#0  __fscanf (stream=0xb6f86440, format=0xb74aad26 "") at fscanf.c:31
#1  0xb74992c9 in breakPoint () from ./libuno_sal.so.3
#2  0xb7499b09 in rtl_uString_newConcat () from ./libuno_sal.so.3
#3  0xb7499f0c in rtl_uString_newReplaceStrAt () from ./libuno_sal.so.3
#4  0xb78380e6 in rtl::OUString::replaceAt () from ./libtl680li.so
#5  0xb7838121 in INetURLObject::SubString::set () from ./libtl680li.so
#6  0xb7838174 in INetURLObject::SubString::set () from ./libtl680li.so
#7  0xb78381c1 in INetURLObject::SubString::set () from ./libtl680li.so
#8  0xb783415b in INetURLObject::setAbsURIRef () from ./libtl680li.so
#9  0xa27ebf5c in INetURLObject::INetURLObject () from ./libfwk680li.so

#10 0xa28b1057 in framework::CmdImageList::impl_fillCommandToImageNameMap () from ./libfwk680li.so
#11 0xa28b11fe in framework::CmdImageList::getImageFromCommandURL () from ./libfwk680li.so
#12 0xa28b1283 in framework::GlobalImageList::getImageFromCommandURL () from ./libfwk680li.so
#13 0xa28b1bc0 in framework::ModuleImageManager::getImages () from ./libfwk680li.so
#14 0xa288dd54 in framework::ToolBarManager::RequestImages () from ./libfwk680li.so
#15 0xa2891172 in framework::ToolBarManager::FillToolbar () from ./libfwk680li.so
#16 0xa288b5e9 in framework::ToolBarWrapper::initialize () from ./libfwk680li.so
#17 0xa28896a8 in framework::ToolBoxFactory::createUIElement () from ./libfwk680li.so
#18 0xa2840a34 in framework::UIElementFactoryManager::createUIElement () from ./libfwk680li.so
#19 0xa2822817 in framework::LayoutManager::implts_createElement () from ./libfwk680li.so
#20 0xa2822a9f in framework::LayoutManager::createElement () from ./libfwk680li.so
#21 0xa281ee7c in framework::LayoutManager::requestElement () from ./libfwk680li.so

#0  __fscanf (stream=0xb6f86440, format=0xb74aad26 "") at fscanf.c:31
#1  0xb74992c9 in breakPoint () from ./libuno_sal.so.3
#2  0xb749a12e in rtl_uString_newFromStr_WithLength () from ./libuno_sal.so.3
#3  0xa27d161c in rtl::OUString::copy () from ./libfwk680li.so
#4  0xa27fdb54 in framework::URLTransformer::parseStrict () from ./libfwk680li.so

#5  0xa2cf23ae in SfxStatusListener::SfxStatusListener () from ./libsfx680li.so
#6  0xa155ea14 in SfxStyleControllerItem_Impl::SfxStyleControllerItem_Impl () from ./libsvx680li.so
#7  0xa15657fd in SvxStyleToolBoxControl::initialize () from ./libsvx680li.so
#8  0xa289039b in framework::ToolBarManager::CreateControllers () from ./libfwk680li.so
#9  0xa2891183 in framework::ToolBarManager::FillToolbar () from ./libfwk680li.so
#10 0xa288b5e9 in framework::ToolBarWrapper::initialize () from ./libfwk680li.so
#11 0xa28896a8 in framework::ToolBoxFactory::createUIElement () from ./libfwk680li.so
#12 0xa2840a34 in framework::UIElementFactoryManager::createUIElement () from ./libfwk680li.so
#13 0xa2822817 in framework::LayoutManager::implts_createElement () from ./libfwk680li.so
#14 0xa2822a9f in framework::LayoutManager::createElement () from ./libfwk680li.so
#15 0xa281ee7c in framework::LayoutManager::requestElement () from ./libfwk680li.so
#16 0xa2c3209d in SfxWorkWindow::UpdateObjectBars_Impl () from ./libsfx680li.so
#17 0xa2c3465d in SfxFrameWorkWin_Impl::UpdateObjectBars_Impl () from ./libsfx680li.so
#18 0xa2ce6864 in SfxDispatcher::Update_Impl () from ./libsfx680li.so
#19 0xa2bcbb72 in SfxApplication::SetViewFrame_Impl () from ./libsfx680li.so
#20 0xa2ccac95 in SfxViewFrame::SetViewFrame () from ./libsfx680li.so
#21 0xa2ccd444 in SfxViewFrame::MakeActive_Impl () from ./libsfx680li.so
#22 0xa2cd8329 in SfxTopFrame::InsertDocument () from ./libsfx680li.so
#23 0xa2bdd789 in SfxApplication::NewDocDirectExec_ImplOld () from ./libsfx680li.so
#24 0xa2cbec93 in SfxFrameLoader_Impl::load () from ./libsfx680li.so
#25 0xa286b1e4 in framework::LoadEnv::impl_loadContent () from ./libfwk680li.so
#26 0xa286b3fc in framework::LoadEnv::startLoading () from ./libfwk680li.so
#27 0xa286b5b6 in framework::LoadEnv::loadComponentFromURL () from ./libfwk680li.so
#28 0xa27bd731 in framework::Desktop::loadComponentFromURL () from ./libfwk680li.so

#0  __fscanf (stream=0xb6f86440, format=0xb74aad26 "") at fscanf.c:31
#1  0xb74992c9 in breakPoint () from ./libuno_sal.so.3
#2  0xb749a12e in rtl_uString_newFromStr_WithLength () from ./libuno_sal.so.3
#3  0xb7823fda in rtl::OUString::OUString () from ./libtl680li.so
#4  0xb7835411 in INetURLObject::decode () from ./libtl680li.so
#5  0xa27fe2e5 in INetURLObject::decode () from ./libfwk680li.so
#6  0xa27fe31a in INetURLObject::GetMainURL () from ./libfwk680li.so
#7  0xa27fde85 in framework::URLTransformer::parseStrict () from ./libfwk680li.so

#8  0xb7aaa016 in svt::ToolboxController::bindListener () from ./libsvt680li.so
#9  0xb7aaa383 in svt::ToolboxController::update () from ./libsvt680li.so
#10 0xa288e62d in framework::ToolBarManager::UpdateControllers () from ./libfwk680li.so
#11 0xa288e6df in framework::ToolBarManager::AsyncUpdateControllersHdl () from ./libfwk680li.so
#12 0xa288e73c in framework::ToolBarManager::LinkStubAsyncUpdateControllersHdl () from ./libfwk680li.so
#13 0xb7d51176 in Link::Call () from ./libvcl680li.so
#14 0xb7d5d820 in Timer::Timeout () from ./libvcl680li.so
#15 0xb7d5d95a in Timer::ImplTimerCallbackProc () from ./libvcl680li.so

... one copy coming in from the binary config cache ".uno:..." ...
... at least one copy coming from the framework ...
... one from parseStrict ? ...


+ configmgr -
    + rtl::OUString(short *, long) -  396k
    + configmgr::implReadPredicate -  218k
    + SimpleReferenceObject        -  229k
    + nodes (RBTree, hash, data)   - 1225k
    + SimpleCheckingHeapMgr	   - 1375k
	Total: 3443 ...

* SfxNewHdl - allocates 1/2 Mb - to free it in
  case of problems. - doesn't seem to be used.


+ re-use cppuhelper foo ..
    + the interfacecontainer.cxx
	+ the HelperInt32 - we have 392 of them - and ~none contain anything.
	    + 'addInterface' - never called - load a doc: one or 2 entries.

+ saves 713k

SalStrIntern:

before: (K)

Total:   446728 326580  22036
Total:   446724 326576  22036
Total:   446728 326572  22032

after: (K)
Total:   445872 325704  21164
Total:   445868 325704  21164
Total:   445868 325712  21168

Saving:
    + 860K ...


** We should look at the 'Resource' files ...
   + can we shrink these ?
