* Splashperform *

** Closed issues
    + we will have lots of small shell-script wrappers
	+ will point to the real, absolute path of the binary
	+ they will set OOO_EXTRA_ARG to be '-writer' etc.

** Open issues
    + how do we cope with app exit ? [ pipe should die ... ? ]

    + how do we provide status / exit for splash
	+ g_spawn_async ... - progress fd ?
	+ fprintf (out_fd, "2%"); etc. ?
    + stop it from using -splash-pipe as a file name ! ;-)
	+ elide elsewhere ...
		
	
    + how do we get the install path ?
	+ hard code at compile time ?
	+ special elf section ?
	+ special (large) symbol that can be over-written ?
	+ symlink ?

    + why use foo when we can use install path
      as the key & avoid parsing bootstraprc
      at all ...
	    + getExecutableFile(aIniName);

    A fast / native startup app ...

    + CWS 'unxsplash'


** What does 'ooo-wrapper do ?
    + grab it's symlink name & fork that component
	+ [ if no args ]
	+ eg. oowriter -> -writer ...
	+ -oofromtemplate => 'slot:5500' ...
    + .lock file ... [ now obsolete ? ]
	+ used for dynamic install ...
    + quickstart junk ...
    + '--widgets-set gtk'
	+ [ just sets SAL_USE_VCLPLUGIN ]
    + '--version" 'built with ooo-build-$OOO_BUILDVERSION'
	( can be done up-stream )
    + sets 'SAL_NOEXPANDFPICKER' [ an anachronism ? ]
    + access writes
	+ fix ~/.ooo-2.0* privs.
	+ fix ~/.recently-used privs.
    + check /proc/version exists [ won't work without a mounted /proc ]

** Rename binary to 'openoffice' ?
    + pass '-writer' etc. in from the .desktop file ?
    + so we can foo the baa's ?

** What does soffice do ?
    + 
 
** Further work
    + Make the KDE version of the ooqstart
	+ Or - maybe even better - do it X-only?
	+ glib dependancy probably inevitable

** From IRC:

[michael_] about this quickstarter,
[michael_] :-)
[michael_] so - I guess you may want a KDE version of it at some stage,
[michael_] let me tell you how it works:
[michael_] or (of course) perhaps it works well enough - worth testing.
[michael_] we update the desktop files to be:
[michael_] 'oowriter':
[michael_] export EXTRA_ARG=-writer
[michael_] /usr/lib/ooo/program/ooqstart "*@"
[michael_] .
[michael_] then ooqstart does this:
[michael_] a) try to poke OSL pipe in /tmp
[michael_]    if it can - send the arguments to the main app immediately
[michael_]    ie. very fast 2nd start,
[michael_] b) continues - initialize gtk+
[michael_] c) if sent args - send 'startup completed' type startup hint thing & exit
[michael_] d) otherwise render splash, open pipe to application, read '25%' type output
[michael_] e) fork 'soffice' with args
[michael_] actually wait - we fork soffice before we init gtk+ even,
[michael_] then render the progress bar,
[michael_] then quit when splash is done.
[michael_] .
[michael_] so - it has 2 effects: makes the splash come up much more quickly,
[michael_] 100ms instead of ~1 second ;-)
[michael_] and also - that the 2nd start is very fast.
[michael_] .
[michael_] so - wrt. performance on KDE - I -think- it won't be that bad for 2 reasons:
[michael_] a) gtk/glib have almost no symbol driven relocations & => fast, also - glib is already around for HAL etc. on a pure-KDE system.
>kendy< I thought that the same for the second instance - but it probably has to load a larger app, which is the problem, right?
[michael_] b) most of the slower gtk+ init happens after the soffice fork anyway, so ...
[michael_] ah - yes,
[michael_] so - the same thing happens if you use 'soffice.bin -writer' wrt. a 2nd start,
[michael_] but instead of being ~1 library dependency + almost no work
[michael_] you initialize UNO, load the services RDBs, page all the libraries into memory with 'pagein' etc. ;-)
[michael_] it's some serious weight,
[michael_] this avoids all that,
[michael_] eg. running 'javaldx' ;-)
>kendy< I see, OK.
[michael_] so - it's substantially faster whatever you run for a 2nd start,
[michael_] and of course, it'll be faster to render the splash too - particularly at cold start regardless,
[michael_] .
[michael_] so - I think it's good for KDE & GNOME whatever,
[michael_] .
[michael_] of course;
[michael_] we can create a KDE specific version at some stage;
[michael_] and switch on that in the shell script,
[michael_] or do some stuff with dlopen again ;-)
[michael_] but - it's quite some pain - wrt. forking, progress sockets, argument handling etc. and a pain to maintain 2 things,
[michael_] up to you of course;
[michael_] either way - of course - none of it may work at all ;->
[michael_] that's more than likely, we'll see when pmladek's build finishes,
>kendy< I do not want to start writing it now - as long as the progress bar is the only visible thing there ;-)
>kendy< But maybe later
[michael_] sure,
>kendy< May I paste this to some doc.txt in ooo-build?
[michael_] of course IMHO the gtk+ progress bar is way uglier than the soffice.bin one,
[michael_] kendy of course - there is already a doc/splashperform.txt
[michael_] append it to that :-)
>kendy< OK :-)
 michael_ might fix that,
[michael_] lets see if the UI people complain ;-)
>kendy< Well, what about to do it pure X, and the same progressbar as in OOo? ;-)
[michael_] so, we could do that,
[michael_] indeed 'pl' had some code to do that,
[michael_] but - we have this pain of pre-dithering the splash screens at 16bit,
[michael_] and gtk+ has all this nice code to do that already so ...
[michael_] also - we'd have to cut/paste the session mgmt stuff too
[michael_] s/session mgmt/startup-notification/
>kendy< Lubos Lunak (Seli) did some KDE pure-X splash, maybe I could use parts of it here ;-)
[michael_] sure, if there is some code why not,
[michael_] I'd prefer to keep the glib dep - since the pipe stuff is rather interesting without it,
[michael_] but - there is plenty of room for expansion,
>kendy< OK :-) I'll have a look in 2 weeks - after all the CWSes for 2.0.2...
[michael_] sounds good,
>kendy< Thank you for the explanation of the stuff :-)
[michael_] no problem,
[michael_] I'm hoping it'll provide a nice perceptual speedup,
[michael_] at least - when I run it from the console it 'feels' faster ;-)
>kendy< :-)
[michael_] [ as one Gentoo user said to another ;-]
[michael_] 1/3rd sec vs. 1+sec or so,
