On 2011-01-27 Christian Lohmaier wrote:
So my question is: Did you just skim over the installer to identify
the part that is slow, or did you profile it yourself? And how did you
measure the improvement?
I added "-d:DProf" to the perl calls in ooinstall to profile it.
I measured the improvement with the profiler as well. The cumulated
time for collect_directories_from_filesarray went down from 9.7 s to
1.2 s when running make_installer.pl for LibreOffice_SDK (far less
improvement for LibreOffice).
(and did you also try different variants of the regex handling, like
incorporating the
$longlist =~ s/\s*,\s*/,/g;
into the split? /\s*(,\s*)+/
That takes about 3 times as long.
I also kind of wonder why there is a hash involved instead of just
using an array to begin with - as only the keys are used anyway. Is
using a hash really faster?
The hash is used to remove any duplicates (all keys in a hash are
unique).
(well, then again I don't think that the longlist part is what
accounts for the massive speedup - or does it?)
No, it doesn't (saves about 1 second from of a total of 8). Most of
the speedup probably comes from concatenating strings with "a .= b"
instead of "a = a . b".
Context
- Re: [Libreoffice] [Patch] Accelerate Perl installer builder · Jan Darmochwal
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.