[Libreoffice] [PATCH] installer::archivefiles - remove external find and chmod forks

Steven Butler stevenb at kjross.com.au
Fri Jan 7 12:54:11 PST 2011


Hi,

The patch is LGPLv2+/MPL.

Note that the permissions in the patch I sent were not the same as the
original so they should be adjusted from 0755 to 0775.

Note also that it isn't just done for Windows.  There is one branch for the
windows build that patches the DLL files, and another branch for UNIX that
sets rwxrwxrx on all the directories that are unzipped.

I had a bit of a look at the rest of the installer with the profiler.  It is
complicated to analyse because it seems to be called several times and each
invocation overwrites the previous trace file.  I also couldn't really see
anything obvious from a micro level to optimize and I really don't have the
time right now to properly understand what the installer is doing to make
more macro level changes.

I made some attempts to cache some data from the config files which seem to
be processed as text blocks but I was getting tremendous variation in my
benchmark times and couldn't see it making any difference and the risk of
breakage was high so I didn't pursue it further.  While the current approach
to scanning blocks of the config each time looks ugly, I'm not convinced
that going to the effort to translate the config files up-front into proper
perl data structures would make things noticeably more efficient either.

On my machine it seems a large proportion of the time is actually spent
running an external exe: regcomp that processes the .so files.

While I would love to assist further working on this is definitely something
I have to put down on my priority list as I have returned from vacation to
my regular job.

Cheers
Steve

-----Original Message-----
From: Michael Meeks [mailto:michael.meeks at novell.com]
Sent: Saturday, 8 January 2011 2:16 AM
To: Steve Butler
Cc: Tor Lillqvist; libreoffice at lists.freedesktop.org
Subject: Re: [Libreoffice] [PATCH] installer::archivefiles - remove external
find and chmod forks

Hi Steve,

On Mon, 2010-12-20 at 20:17 +1000, Steve Butler wrote:
> I just noticed my patch uses 0755 instead of 0775 as well - I'm not
> sure why you'd give group write access but that's what the original
> does.

	Apologies that this took so long to get reviewed and merged :-) I just
committed it. Whether it is truly useful or not, what is there must be truly
slow on Windows, which can't fork/exec anything in linear time :-) [ and
which is the only platform we do this on ]. Hopefully it'll speed up the
installer there.

	Thank you ! :-)

	It'd be great if you could perhaps clone / cut/paste part of the relevant
Easy Hack to the 'completed easy hacks' page, and/or its great to have a
statement saying the patch is LGPLv2+/MPL as you post it.

	Thanks again & what else are you interested in ? [ there is a lot of
low-hanging perl fruit in our make_installer world I think - simply running
it under a profiler and doing some optimisation would be highly fruitful I
think ].

	All the best,

		Michael.

--
 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot


More information about the LibreOffice mailing list