Re: [PUSHED] Turn on strictures for some installer Perl modules
On 15 February 2012 11:58, Michael Meeks michael.me...@suse.com wrote: Also the 'make_installer.pl' takes about 20 options, AFAIR there are however only a few legitimate parameters / configurations that are possible in the LibreOffice world. So - digging out the call sites (luckily the ooinstall wrapper seems to have swallowed most of them outside of instsetoo_native) and simplifying those paths would prolly expose much more redundancy to perl. Ah, thanks for pointing me to that. There's some nice cleanup possible in installer::parameter. Norbert reports you want: make cmd cmd=solenv/bin/ooinstall ... Running this under Devel::NYTProf, I found that a good deal of the slowness of make_installer.pl was due to Archive::Zip, which could be replaced by a call to 'unzip'. So some more nice cleanup should be possible in installer::archivefiles. :) Kind regards, -- Tim Retout t...@retout.co.uk ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PUSHED] Turn on strictures for some installer Perl modules
Hi Tim, On Thu, 2012-02-16 at 11:08 +, Tim Retout wrote: Ah, thanks for pointing me to that. There's some nice cleanup possible in installer::parameter. :-) make cmd cmd=solenv/bin/ooinstall ... Running this under Devel::NYTProf, I found that a good deal of the slowness of make_installer.pl was due to Archive::Zip, which could be replaced by a call to 'unzip'. So some more nice cleanup should be possible in installer::archivefiles. :) Right; if I recall, in the past we may well have used unzip here, but (no doubt) someone thought it would be better to use the Archive stuff. Quite why it takes -so- much time to do that zip / unzip phase is really unclear to me. I imagine the design is rather suspect here. Certainly the idea of unzipping everything into /tmp/ [ consuming some chunk of disk space larger than the install size ], is itself odd ;-) IIRC, there was one phase that just needed to know what the files directories are inside the .zip files, and another that wants to install them: but of course, most of those .zip files are created during the install process [ to avoid needing scp2/ fragments for lots of little / similar files ]. So - it's all a bit silly really I think :-) but I know a number of builders who would be thrilled to get a quicker build time the archive handling phase is quite a chunk of that ... Thanks, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PUSHED] Turn on strictures for some installer Perl modules
Hi Tim ! On Tue, 2012-02-14 at 23:02 +, Tim Retout wrote: I'd like to try to clean up some of the code in the solenv Perl modules Cool ! it is long overdue. - as a first task, I want to turn on 'use strict', which I'd consider a bare minimum for maintainable Perl. Longer-term, Perl::Critic flags up lots of nice stuff, and then there's performance and so on. Great stuff. My first few attempts at this have ended up ballooning into large tasks - for instance, there seem to be lots of unused subroutines in the installer code, which could safely be removed. But I then end up not sending in any patches, and have no idea if I'm going way beyond what's acceptable. :) Oh - well; I would imagine that the installer code is riddled with unused stuff, certainly ! :-) a lot of this perl appears to have written by rather inexperienced perl programmers, without a very deep understanding (I'm afraid). So - if you see lots of low hanging fruit, that's because it is there ;-) Also the 'make_installer.pl' takes about 20 options, AFAIR there are however only a few legitimate parameters / configurations that are possible in the LibreOffice world. So - digging out the call sites (luckily the ooinstall wrapper seems to have swallowed most of them outside of instsetoo_native) and simplifying those paths would prolly expose much more redundancy to perl. So here's a first small patch that should be quite safe. Pushed; thanks :-) One thing I'd like to check: is the best way to test make_installer.pl to run: source config_host.mk solenv/bin/ooinstall /tmp/foo Norbert reports you want: make cmd cmd=solenv/bin/ooinstall ... (I get a few errors when sourcing config_host.mk.) Potentially you can make cmd cmd=bash :-) I've added my name to https://wiki.documentfoundation.org/Development/Developers with a link to my previous license statement on the mailing list. Great ! looking forward to your efforts here, there is a lot of dunging out to do. All the best, Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice