| Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/featurecomponent.pm |
| Statements | Executed 434172 statements in 24.6s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 17.3s | 17.9s | installer::windows::featurecomponent::create_featurecomponent_table_from_registry_collector |
| 1 | 1 | 1 | 7.26s | 8.12s | installer::windows::featurecomponent::create_featurecomponent_table_from_files_collector |
| 15890 | 1 | 1 | 123ms | 123ms | installer::windows::featurecomponent::CORE:subst (opcode) |
| 1 | 1 | 1 | 3.71ms | 26.1s | installer::windows::featurecomponent::create_featurecomponent_table |
| 1 | 1 | 1 | 492µs | 496µs | installer::windows::featurecomponent::BEGIN@30 |
| 1 | 1 | 1 | 15µs | 18µs | installer::windows::featurecomponent::BEGIN@31 |
| 1 | 1 | 1 | 15µs | 17µs | installer::windows::featurecomponent::BEGIN@33 |
| 1 | 1 | 1 | 14µs | 16µs | installer::windows::featurecomponent::BEGIN@32 |
| 1 | 1 | 1 | 14µs | 16µs | installer::windows::featurecomponent::BEGIN@34 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #************************************************************************* | ||||
| 2 | # | ||||
| 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||||
| 4 | # | ||||
| 5 | # Copyright 2000, 2010 Oracle and/or its affiliates. | ||||
| 6 | # | ||||
| 7 | # OpenOffice.org - a multi-platform office productivity suite | ||||
| 8 | # | ||||
| 9 | # This file is part of OpenOffice.org. | ||||
| 10 | # | ||||
| 11 | # OpenOffice.org is free software: you can redistribute it and/or modify | ||||
| 12 | # it under the terms of the GNU Lesser General Public License version 3 | ||||
| 13 | # only, as published by the Free Software Foundation. | ||||
| 14 | # | ||||
| 15 | # OpenOffice.org is distributed in the hope that it will be useful, | ||||
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| 18 | # GNU Lesser General Public License version 3 for more details | ||||
| 19 | # (a copy is included in the LICENSE file that accompanied this code). | ||||
| 20 | # | ||||
| 21 | # You should have received a copy of the GNU Lesser General Public License | ||||
| 22 | # version 3 along with OpenOffice.org. If not, see | ||||
| 23 | # <http://www.openoffice.org/license.html> | ||||
| 24 | # for a copy of the LGPLv3 License. | ||||
| 25 | # | ||||
| 26 | #************************************************************************* | ||||
| 27 | |||||
| 28 | package installer::windows::featurecomponent; | ||||
| 29 | |||||
| 30 | 2 | 65µs | 2 | 499µs | # spent 496µs (492+4) within installer::windows::featurecomponent::BEGIN@30 which was called:
# once (492µs+4µs) by installer::BEGIN@67 at line 30 # spent 496µs making 1 call to installer::windows::featurecomponent::BEGIN@30
# spent 4µs making 1 call to UNIVERSAL::import |
| 31 | 2 | 56µs | 2 | 22µs | # spent 18µs (15+3) within installer::windows::featurecomponent::BEGIN@31 which was called:
# once (15µs+3µs) by installer::BEGIN@67 at line 31 # spent 18µs making 1 call to installer::windows::featurecomponent::BEGIN@31
# spent 3µs making 1 call to UNIVERSAL::import |
| 32 | 2 | 59µs | 2 | 19µs | # spent 16µs (14+3) within installer::windows::featurecomponent::BEGIN@32 which was called:
# once (14µs+3µs) by installer::BEGIN@67 at line 32 # spent 16µs making 1 call to installer::windows::featurecomponent::BEGIN@32
# spent 2µs making 1 call to UNIVERSAL::import |
| 33 | 2 | 53µs | 2 | 20µs | # spent 17µs (15+3) within installer::windows::featurecomponent::BEGIN@33 which was called:
# once (15µs+3µs) by installer::BEGIN@67 at line 33 # spent 17µs making 1 call to installer::windows::featurecomponent::BEGIN@33
# spent 2µs making 1 call to UNIVERSAL::import |
| 34 | 2 | 1.25ms | 2 | 19µs | # spent 16µs (14+3) within installer::windows::featurecomponent::BEGIN@34 which was called:
# once (14µs+3µs) by installer::BEGIN@67 at line 34 # spent 16µs making 1 call to installer::windows::featurecomponent::BEGIN@34
# spent 3µs making 1 call to UNIVERSAL::import |
| 35 | |||||
| 36 | ################################################################################# | ||||
| 37 | # Collecting all pairs of features and components from the files collector | ||||
| 38 | ################################################################################# | ||||
| 39 | |||||
| 40 | sub create_featurecomponent_table_from_files_collector | ||||
| 41 | # spent 8.12s (7.26+861ms) within installer::windows::featurecomponent::create_featurecomponent_table_from_files_collector which was called:
# once (7.26s+861ms) by installer::windows::featurecomponent::create_featurecomponent_table at line 159 | ||||
| 42 | 238338 | 7.32s | my ($featurecomponenttableref, $filesref) = @_; | ||
| 43 | |||||
| 44 | for ( my $i = 0; $i <= $#{$filesref}; $i++ ) | ||||
| 45 | { | ||||
| 46 | my $onefile = ${$filesref}[$i]; | ||||
| 47 | |||||
| 48 | my $filecomponent = $onefile->{'componentname'}; | ||||
| 49 | my $filemodules = $onefile->{'modules'}; | ||||
| 50 | |||||
| 51 | if ( $filecomponent eq "" ) | ||||
| 52 | { | ||||
| 53 | installer::exiter::exit_program("ERROR: No component defined for file $onefile->{'Name'}", "create_featurecomponent_table_from_files_collector"); | ||||
| 54 | } | ||||
| 55 | if ( $filemodules eq "" ) | ||||
| 56 | { | ||||
| 57 | installer::exiter::exit_program("ERROR: No modules found for file $onefile->{'Name'}", "create_featurecomponent_table_from_files_collector"); | ||||
| 58 | } | ||||
| 59 | |||||
| 60 | 15888 | 170ms | my $filemodulesarrayref = installer::converter::convert_stringlist_into_array(\$filemodules, ","); # spent 170ms making 15888 calls to installer::converter::convert_stringlist_into_array, avg 11µs/call | ||
| 61 | |||||
| 62 | for ( my $j = 0; $j <= $#{$filemodulesarrayref}; $j++ ) | ||||
| 63 | { | ||||
| 64 | my %featurecomponent = (); | ||||
| 65 | |||||
| 66 | my $onemodule = ${$filemodulesarrayref}[$j]; | ||||
| 67 | 15890 | 123ms | $onemodule =~ s/\s*$//; # spent 123ms making 15890 calls to installer::windows::featurecomponent::CORE:subst, avg 8µs/call | ||
| 68 | $featurecomponent{'Feature'} = $onemodule; | ||||
| 69 | $featurecomponent{'Component'} = $filecomponent; | ||||
| 70 | |||||
| 71 | # Attention: Features are renamed, because the maximum length is 38. | ||||
| 72 | # But in the files collector ($filesref), the original names are saved. | ||||
| 73 | |||||
| 74 | 15890 | 567ms | installer::windows::idtglobal::shorten_feature_gid(\$featurecomponent{'Feature'}); # spent 567ms making 15890 calls to installer::windows::idtglobal::shorten_feature_gid, avg 36µs/call | ||
| 75 | |||||
| 76 | $oneline = "$featurecomponent{'Feature'}\t$featurecomponent{'Component'}\n"; | ||||
| 77 | |||||
| 78 | # control of uniqueness | ||||
| 79 | |||||
| 80 | if (! grep {$_ eq $oneline} @{$featurecomponenttableref}) | ||||
| 81 | { | ||||
| 82 | push(@{$featurecomponenttableref}, $oneline); | ||||
| 83 | } | ||||
| 84 | } | ||||
| 85 | } | ||||
| 86 | } | ||||
| 87 | |||||
| 88 | ################################################################################# | ||||
| 89 | # Collecting all pairs of features and components from the registry collector | ||||
| 90 | ################################################################################# | ||||
| 91 | |||||
| 92 | sub create_featurecomponent_table_from_registry_collector | ||||
| 93 | # spent 17.9s (17.3+659ms) within installer::windows::featurecomponent::create_featurecomponent_table_from_registry_collector which was called:
# once (17.3s+659ms) by installer::windows::featurecomponent::create_featurecomponent_table at line 161 | ||||
| 94 | 195813 | 17.2s | my ($featurecomponenttableref, $registryref) = @_; | ||
| 95 | |||||
| 96 | for ( my $i = 0; $i <= $#{$registryref}; $i++ ) | ||||
| 97 | { | ||||
| 98 | my $oneregistry = ${$registryref}[$i]; | ||||
| 99 | |||||
| 100 | my $registrycomponent = $oneregistry->{'componentname'}; | ||||
| 101 | my $registrymodule = $oneregistry->{'ModuleID'}; | ||||
| 102 | |||||
| 103 | if ( $registrycomponent eq "" ) | ||||
| 104 | { | ||||
| 105 | installer::exiter::exit_program("ERROR: No component defined for registry $oneregistry->{'gid'}", "create_featurecomponent_table_from_registry_collector"); | ||||
| 106 | } | ||||
| 107 | if ( $registrymodule eq "" ) | ||||
| 108 | { | ||||
| 109 | installer::exiter::exit_program("ERROR: No modules found for registry $oneregistry->{'gid'}", "create_featurecomponent_table_from_registry_collector"); | ||||
| 110 | } | ||||
| 111 | |||||
| 112 | my %featurecomponent = (); | ||||
| 113 | |||||
| 114 | $featurecomponent{'Feature'} = $registrymodule; | ||||
| 115 | $featurecomponent{'Component'} = $registrycomponent; | ||||
| 116 | |||||
| 117 | # Attention: Features are renamed, because the maximum length is 38. | ||||
| 118 | # But in the files collector ($filesref), the original names are saved. | ||||
| 119 | |||||
| 120 | 17801 | 659ms | installer::windows::idtglobal::shorten_feature_gid(\$featurecomponent{'Feature'}); # spent 659ms making 17801 calls to installer::windows::idtglobal::shorten_feature_gid, avg 37µs/call | ||
| 121 | |||||
| 122 | $oneline = "$featurecomponent{'Feature'}\t$featurecomponent{'Component'}\n"; | ||||
| 123 | |||||
| 124 | # control of uniqueness | ||||
| 125 | |||||
| 126 | if (! grep {$_ eq $oneline} @{$featurecomponenttableref}) | ||||
| 127 | { | ||||
| 128 | push(@{$featurecomponenttableref}, $oneline); | ||||
| 129 | } | ||||
| 130 | } | ||||
| 131 | } | ||||
| 132 | |||||
| 133 | ################################################################################# | ||||
| 134 | # Creating the file FeatureC.idt dynamically | ||||
| 135 | # Content: | ||||
| 136 | # Feature Component | ||||
| 137 | ################################################################################# | ||||
| 138 | |||||
| 139 | sub create_featurecomponent_table | ||||
| 140 | # spent 26.1s (3.71ms+26.1) within installer::windows::featurecomponent::create_featurecomponent_table which was called:
# once (3.71ms+26.1s) by installer::run at line 1509 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 141 | 10 | 3.68ms | my ($filesref, $registryref, $basedir) = @_; | ||
| 142 | |||||
| 143 | my @featurecomponenttable = (); | ||||
| 144 | my $infoline; | ||||
| 145 | |||||
| 146 | 1 | 29µs | installer::windows::idtglobal::write_idt_header(\@featurecomponenttable, "featurecomponent"); # spent 29µs making 1 call to installer::windows::idtglobal::write_idt_header | ||
| 147 | |||||
| 148 | # This is the first time, that features and componentes are related | ||||
| 149 | # Problem: How about created profiles, configurationfiles, services.rdb | ||||
| 150 | # -> simple solution: putting them all to the root module | ||||
| 151 | # Otherwise profiles and configurationfiles cannot be created the way, they are now created | ||||
| 152 | # -> especially a problem for the configurationfiles! # ToDo | ||||
| 153 | # Very good: All ProfileItems belong to the root | ||||
| 154 | # services.rdb belongs to the root anyway. | ||||
| 155 | |||||
| 156 | # At the moment only the files are related to components (and the files know their modules). | ||||
| 157 | # The component for each file is written into the files collector $filesinproductlanguageresolvedarrayref | ||||
| 158 | |||||
| 159 | 1 | 8.12s | create_featurecomponent_table_from_files_collector(\@featurecomponenttable, $filesref); # spent 8.12s making 1 call to installer::windows::featurecomponent::create_featurecomponent_table_from_files_collector | ||
| 160 | |||||
| 161 | 1 | 17.9s | create_featurecomponent_table_from_registry_collector(\@featurecomponenttable, $registryref); # spent 17.9s making 1 call to installer::windows::featurecomponent::create_featurecomponent_table_from_registry_collector | ||
| 162 | |||||
| 163 | # Additional components have to be added here | ||||
| 164 | |||||
| 165 | # Saving the file | ||||
| 166 | |||||
| 167 | my $featurecomponenttablename = $basedir . $installer::globals::separator . "FeatureC.idt"; | ||||
| 168 | 1 | 4.07ms | installer::files::save_file($featurecomponenttablename ,\@featurecomponenttable); # spent 4.07ms making 1 call to installer::files::save_file | ||
| 169 | $infoline = "Created idt file: $featurecomponenttablename\n"; | ||||
| 170 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 171 | |||||
| 172 | } | ||||
| 173 | |||||
| 174 | 1 | 7µs | 1; | ||
# spent 123ms within installer::windows::featurecomponent::CORE:subst which was called 15890 times, avg 8µs/call:
# 15890 times (123ms+0s) by installer::windows::featurecomponent::create_featurecomponent_table_from_files_collector at line 67, avg 8µs/call |