ooo-build r14826 - in trunk: . bin doc patches/dev300 patches/test
- From: michael svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14826 - in trunk: . bin doc patches/dev300 patches/test
- Date: Thu, 11 Dec 2008 14:45:50 +0000 (UTC)
Author: michael
Date: Thu Dec 11 14:45:49 2008
New Revision: 14826
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14826&view=rev
Log:
2008-12-11 Michael Meeks <michael meeks novell com>
* patches/dev300/warning-spin-button.diff,
* patches/dev300/apply: remove, obsolete.
* patches/dev300/speed-make-installer.diff,
* patches/dev300/apply: accelerate make-installer.pl by 10
bogo-seconds.
Added:
trunk/patches/dev300/speed-make-installer.diff (contents, props changed)
- copied, changed from r14820, /trunk/patches/test/speed-make-installer.diff
Removed:
trunk/patches/dev300/warning-spin-button.diff
trunk/patches/test/speed-make-installer.diff
Modified:
trunk/ChangeLog
trunk/bin/ooinstall
trunk/doc/installer.txt
trunk/patches/dev300/apply
Modified: trunk/bin/ooinstall
==============================================================================
--- trunk/bin/ooinstall (original)
+++ trunk/bin/ooinstall Thu Dec 11 14:45:49 2008
@@ -151,7 +151,7 @@
print "Running OOo installer\n";
system ("cd $setup_vars{OOBUILDDIR}/instsetoo_native/util ; " .
- "perl -w $configure_vars{SOLARENV}/bin/make_installer.pl " .
+ "perl -d:DProf -w $configure_vars{SOLARENV}/bin/make_installer.pl " .
"-f openoffice.lst -l $langs -p OpenOffice " .
"-buildid $BUILD $destdir $strip " .
"-simple $path") && die "Failed to install: $!";
Modified: trunk/doc/installer.txt
==============================================================================
--- trunk/doc/installer.txt (original)
+++ trunk/doc/installer.txt Thu Dec 11 14:45:49 2008
@@ -1,5 +1,82 @@
** make_installer.pl slowness **
+Use -d:DProf
+
+
+The modulegids_for_itemgid problem is simple:
+ + we have lists of files in each module,
+ + but not lists of modules for each file
+ + we try to fix this.
+ + unfortunately the order of this is extremely high.
+ + surely better to:
+ + walk this backwards: foreach module
+ + split & append item name to each gid ...
+
+
+Before:
+
+Total Elapsed Time = 40.09854 Seconds
+ User+System Time = 17.76854 Seconds
+Exclusive Times
+%Time ExclSec CumulS #Calls sec/call Csec/c Name
+ 45.9 8.158 8.168 1025 0.0080 0.0080 installer::scriptitems::get_string
+ _of_modulegids_for_itemgid
+ 13.2 2.360 2.640 8 0.2950 0.3300 installer::setupscript::get_all_it
+ ems_from_script
+ 11.8 2.110 2.110 1 2.1100 2.1099 installer::setupscript::replace_al
+ l_setupscriptvariables_in_script
+ 5.45 0.968 0.968 787 0.0012 0.0012 installer::converter::convert_stri
+ nglist_into_hash
+ 3.55 0.630 0.630 36 0.0175 0.0175 installer::scpzipfiles::replace_al
+ l_ziplistvariables_in_file
+ 2.96 0.526 0.561 1 0.5257 0.5613 installer::archivefiles::resolving
+ _archive_flag
+ 2.32 0.413 1.375 1 0.4133 1.3752 installer::scriptitems::collect_di
+ rectories_from_filesarray
+ 1.58 0.281 0.281 54532 0.0000 0.0000 installer::remover::remove_leading
+ _and_ending_quotationmarks
+ 1.28 0.228 0.228 1018 0.0002 0.0002 installer::scriptitems::get_Direct
+ oryname_From_Directorygid
+ 1.07 0.190 0.220 44 0.0043 0.0050 installer::packagelist::get_packin
+ fo
+ 0.92 0.164 0.164 2754 0.0001 0.0001 installer::existence::exists_in_ar
+ ray
+ 0.84 0.149 0.336 62 0.0024 0.0054 main::BEGIN
+ 0.82 0.145 0.145 1333 0.0001 0.0001 installer::systemactions::read_com
+ plete_directory
+ 0.73 0.130 0.130 84 0.0015 0.0015 installer::files::read_file
+ 0.56 0.100 0.100 106 0.0009 0.0009 installer::scriptitems::get_langua
+ gespecific_module
+
+After:
+
+Total Elapsed Time = 30.53867 Seconds
+ User+System Time = 9.308677 Seconds
+Exclusive Times
+%Time ExclSec CumulS #Calls sec/call Csec/c Name
+ 24.8 2.313 2.425 8 0.2891 0.3032 installer::setupscript::get_all_it
+ ems_from_script
+ 22.3 2.080 2.080 1 2.0799 2.0799 installer::setupscript::replace_al
+ l_setupscriptvariables_in_script
+ 9.75 0.908 0.908 787 0.0012 0.0012 installer::converter::convert_stri
+ nglist_into_hash
+ 6.77 0.630 0.630 36 0.0175 0.0175 installer::scpzipfiles::replace_al
+ l_ziplistvariables_in_file
+ 6.28 0.585 0.589 1 0.5846 0.5892 installer::archivefiles::resolving
+ _archive_flag
+ 3.57 0.332 1.291 1 0.3317 1.2914 installer::scriptitems::collect_di
+ rectories_from_filesarray
+ 2.76 0.257 0.257 1018 0.0003 0.0003 installer::scriptitems::get_Direct
+ oryname_From_Directorygid
+ 1.83 0.170 0.200 44 0.0039 0.0045 installer::packagelist::get_packin
+ fo
+ 1.75 0.163 0.163 1336 0.0001 0.0001 installer::systemactions::read_com
+ plete_directory
+ 1.71 0.159 0.355 62 0.0026 0.0057 main::BEGIN
+ 1.54 0.143 0.143 2754 0.0001 0.0001 installer::existence::exists_in_ar
+ ray
+
+
+ why is it so bad ?
--------
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu Dec 11 14:45:49 2008
@@ -441,8 +441,10 @@
# fix that allows OOo to work with a standard (unpatched) libjpeg,
jpegc.c.diff, i#80674, n#272574, flr
-
[ Fixes ]
+# speed up make_installer.pl by ~25%
+speed-make-installer.diff, i#97124, michael
+
# process relative SMB paths (in hyperlinks) correctly
tools-urlobj-smb-scheme-patch.diff, n#261623, flr
samba-hyperlinks-sc-sd.diff, n#382718, jholesov
@@ -2722,10 +2724,6 @@
# and in the Start Menu on Windows
win32-tooltips.diff, tml
-# avoid annoying warning
-# FIXME 2008-11-26: already in?
-#warning-spin-button.diff, i#95554, michael
-
# openjdk contains rhino.jar. breaks the build...
buildfix-openjdk-6-no-rhino.diff
Copied: trunk/patches/dev300/speed-make-installer.diff (from r14820, /trunk/patches/test/speed-make-installer.diff)
==============================================================================
--- /trunk/patches/test/speed-make-installer.diff (original)
+++ trunk/patches/dev300/speed-make-installer.diff Thu Dec 11 14:45:49 2008
@@ -3,36 +3,108 @@
RCS file: /cvs/tools/solenv/bin/modules/installer/scriptitems.pm,v
retrieving revision 1.51.18.2
diff -u -p -r1.51.18.2 scriptitems.pm
---- modules/installer/scriptitems.pm 22 Aug 2008 09:16:03 -0000 1.51.18.2
-+++ modules/installer/scriptitems.pm 10 Dec 2008 17:56:53 -0000
-@@ -2371,12 +2373,10 @@ sub get_string_of_modulegids_for_itemgid
+--- solenv/bin/modules/installer/scriptitems.pm 22 Aug 2008 09:16:03 -0000 1.51.18.2
++++ solenv/bin/modules/installer/scriptitems.pm 11 Dec 2008 07:06:08 -0000
+@@ -2361,33 +2363,66 @@ sub resolve_links_with_flag_relative
+ # This function is a helper of function "assigning_modules_to_items"
+ ########################################################################
+
++sub insert_for_item ($$$)
++{
++ my ($hash, $item, $id) = @_;
++
++# print STDERR "insert '$id' for '$item'\n";
++ if (!defined $hash->{$item}) {
++ my @gids = ();
++ $hash->{$item} = \ gids;
++ }
++ my $gid_list = $hash->{$item};
++ push @{$gid_list}, $id;
++ $hash->{$item} = $gid_list;
++}
++
++sub build_modulegids_table
++{
++ my ($modulesref, $itemname) = @_;
++ my %module_lookup_table;
++
++ # build map of item names to list of respective module gids
++ # containing these items
++ for my $onemodule (@{$modulesref})
++ {
++ next if ( ! defined $onemodule->{$itemname} );
++ # these are the items contained in this module
++ # eg. Files = (gid_a_b_c,gid_d_e_f)
++ my $module_gids = $onemodule->{$itemname};
++
++ # prune outer brackets
++ $module_gids =~ s|^\s*\(||g;
++ $module_gids =~ s|\)\s*$||g;
++ for my $id (split (/,/, $module_gids))
++ {
++ chomp $id;
++ insert_for_item (\%module_lookup_table, lc ($id), $onemodule->{'gid'});
++ }
++ }
++
++ return \%module_lookup_table;
++}
++
+ sub get_string_of_modulegids_for_itemgid
+ {
+- my ($modulesref, $itemgid, $itemname) = @_;
++ my ($module_lookup_table, $modulesref, $itemgid, $itemname) = @_;
+
+ if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::scriptitems::get_string_of_modulegids_for_itemgid : $#{$modulesref} : $itemgid : $itemname"); }
+
+ my $allmodules = "";
my $haslanguagemodule = 0;
my %foundmodules = ();
-
+-
- for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
-+ for my $onemodule (@{$modulesref})
- {
+- {
- my $onemodule = ${$modulesref}[$i];
- my $allitems = "";
-
- if ( $onemodule->{$itemname} ) { $allitems = $onemodule->{$itemname}; }
-+ next if ( $onemodule->{$itemname} );
-+ my $allitems = $onemodule->{$itemname};
-
- if ( $allitems =~ /\b$itemgid\b/i )
- {
-@@ -2397,6 +2397,8 @@ sub get_string_of_modulegids_for_itemgid
+-
+- if ( $allitems =~ /\b$itemgid\b/i )
+- {
+- $allmodules = $allmodules . "," . $onemodule->{'gid'};
+- $foundmodules{$onemodule->{'gid'}} = 1;
+-
+- # Is this module a language module? This info should be stored at the file.
+- if ( exists($installer::globals::alllangmodules{$onemodule->{'gid'}}) ) { $haslanguagemodule = 1; }
+- }
++
++# print STDERR "lookup '" . lc($itemgid) . "'\n";
++ my $gid_list = $module_lookup_table->{lc($itemgid)};
++
++ for my $gid (@{$gid_list}) {
++ $foundmodules{$gid} = 1;
++ $allmodules = $allmodules . "," . $gid;
++ # Is this module a language module? This info should be stored at the file.
++ if ( exists($installer::globals::alllangmodules{$gid}) ) { $haslanguagemodule = 1; }
+ }
+-
+ $allmodules =~ s/^\s*\,//; # removing leading comma
+
+ # Check: All modules or no module must have flag LANGUAGEMODULE
+@@ -2397,6 +2432,8 @@ sub get_string_of_modulegids_for_itemgid
if ( ! $isreallylanguagemodule ) { installer::exiter::exit_program("ERROR: \"$itemgid\" is assigned to modules with flag \"LANGUAGEMODULE\" and also to modules without this flag! Modules: $allmodules", "get_string_of_modulegids_for_itemgid"); }
}
-+ print STDERR "get_string_for_itemgid ($itemgid, $itemname) => $allmodules, $haslanguagemodule\n";
++# print STDERR "get_string_for_itemgid ($itemgid, $itemname) => $allmodules, $haslanguagemodule\n";
+
return ($allmodules, $haslanguagemodule);
}
-@@ -2415,9 +2417,8 @@ sub assigning_modules_to_items
+@@ -2414,10 +2451,11 @@ sub assigning_modules_to_items
+ my $infoline = "";
my $languageassignmenterror = 0;
my @languageassignmenterrors = ();
++
++ my $module_lookup_table = build_modulegids_table($modulesref, $itemname);
- for ( my $i = 0; $i <= $#{$itemsref}; $i++ )
+ for my $oneitem (@{$itemsref})
@@ -41,3 +113,12 @@
my $itemgid = $oneitem->{'gid'};
my $styles = "";
+@@ -2431,7 +2469,7 @@ sub assigning_modules_to_items
+
+ # every item can belong to many modules
+
+- my ($modulegids, $haslanguagemodule) = get_string_of_modulegids_for_itemgid($modulesref, $itemgid, $itemname);
++ my ($modulegids, $haslanguagemodule) = get_string_of_modulegids_for_itemgid($module_lookup_table,$modulesref, $itemgid, $itemname);
+
+ if ($modulegids eq "")
+ {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]