| Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/feature.pm |
| Statements | Executed 111393362 statements in 371s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 169277 | 1 | 1 | 2.66s | 3.17s | installer::windows::feature::get_feature_display |
| 169277 | 1 | 1 | 1.78s | 1.91s | installer::windows::feature::get_feature_level |
| 169277 | 1 | 1 | 1.64s | 7.60s | installer::windows::feature::get_feature_parent |
| 169277 | 1 | 1 | 1.60s | 7.66s | installer::windows::feature::get_feature_gid |
| 1343425 | 7 | 1 | 1.39s | 1.39s | installer::windows::feature::CORE:match (opcode) |
| 169277 | 1 | 1 | 1.13s | 1.13s | installer::windows::feature::get_feature_attributes |
| 460 | 3 | 1 | 694ms | 694ms | installer::windows::feature::CORE:sort (opcode) |
| 169277 | 1 | 1 | 684ms | 684ms | installer::windows::feature::get_feature_directory |
| 1 | 1 | 1 | 492ms | -321s | installer::windows::feature::sort_feature |
| 1 | 1 | 1 | 165ms | 165ms | installer::windows::feature::add_uniquekey |
| 1 | 1 | 1 | 763µs | 773µs | installer::windows::feature::BEGIN@30 |
| 1 | 1 | 1 | 23µs | 25µs | installer::windows::feature::BEGIN@33 |
| 1 | 1 | 1 | 18µs | 21µs | installer::windows::feature::BEGIN@31 |
| 1 | 1 | 1 | 17µs | 19µs | installer::windows::feature::BEGIN@32 |
| 1 | 1 | 1 | 16µs | 18µs | installer::windows::feature::BEGIN@35 |
| 1 | 1 | 1 | 15µs | 18µs | installer::windows::feature::BEGIN@34 |
| 0 | 0 | 0 | 0s | 0s | installer::windows::feature::replace_one_variable |
| 0 | 0 | 0 | 0s | 0s | installer::windows::feature::replace_variables |
| 1 | 1 | 1 | -178s | -154s | installer::windows::feature::create_feature_table |
| 1554 | 2 | 1 | -322s | -322s | installer::windows::feature::collect_modules_recursive (recurses: max depth 5, inclusive time -119s) |
| 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::feature; | ||||
| 29 | |||||
| 30 | 2 | 130µs | 2 | 782µs | # spent 773µs (763+10) within installer::windows::feature::BEGIN@30 which was called:
# once (763µs+10µs) by installer::BEGIN@66 at line 30 # spent 773µs making 1 call to installer::windows::feature::BEGIN@30
# spent 10µs making 1 call to UNIVERSAL::import |
| 31 | 2 | 60µs | 2 | 24µs | # spent 21µs (18+3) within installer::windows::feature::BEGIN@31 which was called:
# once (18µs+3µs) by installer::BEGIN@66 at line 31 # spent 21µs making 1 call to installer::windows::feature::BEGIN@31
# spent 3µs making 1 call to UNIVERSAL::import |
| 32 | 2 | 57µs | 2 | 22µs | # spent 19µs (17+3) within installer::windows::feature::BEGIN@32 which was called:
# once (17µs+3µs) by installer::BEGIN@66 at line 32 # spent 19µs making 1 call to installer::windows::feature::BEGIN@32
# spent 3µs making 1 call to UNIVERSAL::import |
| 33 | 2 | 57µs | 2 | 27µs | # spent 25µs (23+2) within installer::windows::feature::BEGIN@33 which was called:
# once (23µs+2µs) by installer::BEGIN@66 at line 33 # spent 25µs making 1 call to installer::windows::feature::BEGIN@33
# spent 2µs making 1 call to UNIVERSAL::import |
| 34 | 2 | 56µs | 2 | 22µs | # spent 18µs (15+3) within installer::windows::feature::BEGIN@34 which was called:
# once (15µs+3µs) by installer::BEGIN@66 at line 34 # spent 18µs making 1 call to installer::windows::feature::BEGIN@34
# spent 3µs making 1 call to UNIVERSAL::import |
| 35 | 2 | 3.95ms | 2 | 21µs | # spent 18µs (16+3) within installer::windows::feature::BEGIN@35 which was called:
# once (16µs+3µs) by installer::BEGIN@66 at line 35 # spent 18µs making 1 call to installer::windows::feature::BEGIN@35
# spent 2µs making 1 call to UNIVERSAL::import |
| 36 | |||||
| 37 | ############################################################## | ||||
| 38 | # Returning the gid for a feature. | ||||
| 39 | # Attention: Maximum length | ||||
| 40 | ############################################################## | ||||
| 41 | |||||
| 42 | sub get_feature_gid | ||||
| 43 | # spent 7.66s (1.60+6.06) within installer::windows::feature::get_feature_gid which was called 169277 times, avg 45µs/call:
# 169277 times (1.60s+6.06s) by installer::windows::feature::create_feature_table at line 395, avg 45µs/call | ||||
| 44 | 846385 | 1.54s | my ($onefeature) = @_; | ||
| 45 | |||||
| 46 | my $gid = ""; | ||||
| 47 | |||||
| 48 | if ( $onefeature->{'gid'} ) { $gid = $onefeature->{'gid'}; } | ||||
| 49 | |||||
| 50 | # Attention: Maximum feature length is 38! | ||||
| 51 | 169277 | 6.06s | installer::windows::idtglobal::shorten_feature_gid(\$gid); # spent 6.06s making 169277 calls to installer::windows::idtglobal::shorten_feature_gid, avg 36µs/call | ||
| 52 | |||||
| 53 | return $gid | ||||
| 54 | } | ||||
| 55 | |||||
| 56 | ############################################################## | ||||
| 57 | # Returning the gid of the parent. | ||||
| 58 | # Attention: Maximum length | ||||
| 59 | ############################################################## | ||||
| 60 | |||||
| 61 | sub get_feature_parent | ||||
| 62 | # spent 7.60s (1.64+5.95) within installer::windows::feature::get_feature_parent which was called 169277 times, avg 45µs/call:
# 169277 times (1.64s+5.95s) by installer::windows::feature::create_feature_table at line 396, avg 45µs/call | ||||
| 63 | 1015662 | 1.60s | my ($onefeature) = @_; | ||
| 64 | |||||
| 65 | my $parentgid = ""; | ||||
| 66 | |||||
| 67 | if ( $onefeature->{'ParentID'} ) { $parentgid = $onefeature->{'ParentID'}; } | ||||
| 68 | |||||
| 69 | # The modules, hanging directly below the root, have to be root modules. | ||||
| 70 | # Only then it is possible to make the "real" root module invisible by | ||||
| 71 | # setting the display to "0". | ||||
| 72 | |||||
| 73 | if ( $parentgid eq $installer::globals::rootmodulegid ) { $parentgid = ""; } | ||||
| 74 | |||||
| 75 | # Attention: Maximum feature length is 38! | ||||
| 76 | 169277 | 5.95s | installer::windows::idtglobal::shorten_feature_gid(\$parentgid); # spent 5.95s making 169277 calls to installer::windows::idtglobal::shorten_feature_gid, avg 35µs/call | ||
| 77 | |||||
| 78 | return $parentgid | ||||
| 79 | } | ||||
| 80 | |||||
| 81 | ############################################################## | ||||
| 82 | # Returning the display for a feature. | ||||
| 83 | # 0: Feature is not shown | ||||
| 84 | # odd: subfeatures are shown | ||||
| 85 | # even: subfeatures are not shown | ||||
| 86 | ############################################################## | ||||
| 87 | |||||
| 88 | sub get_feature_display | ||||
| 89 | # spent 3.17s (2.66+504ms) within installer::windows::feature::get_feature_display which was called 169277 times, avg 19µs/call:
# 169277 times (2.66s+504ms) by installer::windows::feature::create_feature_table at line 399, avg 19µs/call | ||||
| 90 | 2200383 | 3.47s | my ($onefeature) = @_; | ||
| 91 | |||||
| 92 | my $display; | ||||
| 93 | my $parentid = ""; | ||||
| 94 | |||||
| 95 | if ( $onefeature->{'ParentID'} ) { $parentid = $onefeature->{'ParentID'}; } | ||||
| 96 | |||||
| 97 | if ( $parentid eq "" ) | ||||
| 98 | { | ||||
| 99 | $display = "0"; # root module is not visible | ||||
| 100 | } | ||||
| 101 | elsif ( $onefeature->{'gid'} eq "gid_Module_Prg") # program module shows subfeatures | ||||
| 102 | { | ||||
| 103 | $display = "1"; # root module shows subfeatures | ||||
| 104 | } | ||||
| 105 | else | ||||
| 106 | { | ||||
| 107 | $display = "2"; # all other modules do not show subfeatures | ||||
| 108 | } | ||||
| 109 | |||||
| 110 | # special case: Feature has flag "HIDDEN_ROOT" -> $display is 0 | ||||
| 111 | my $styles = ""; | ||||
| 112 | if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; } | ||||
| 113 | 169277 | 389ms | if ( $styles =~ /\bHIDDEN_ROOT\b/ ) { $display = "0"; } # spent 389ms making 169277 calls to installer::windows::feature::CORE:match, avg 2µs/call | ||
| 114 | |||||
| 115 | # Special handling for language modules. Only visible in multilingual installation set | ||||
| 116 | 169277 | 115ms | if (( $styles =~ /\bSHOW_MULTILINGUAL_ONLY\b/ ) && ( ! $installer::globals::ismultilingual )) { $display = "0"; } # spent 115ms making 169277 calls to installer::windows::feature::CORE:match, avg 679ns/call | ||
| 117 | |||||
| 118 | # Special handling for c05office. No program module visible. | ||||
| 119 | 109 | 117µs | if (( $onefeature->{'gid'} eq "gid_Module_Prg" ) && ( $installer::globals::product =~ /c05office/i )) { $display = "0"; } # spent 117µs making 109 calls to installer::windows::feature::CORE:match, avg 1µs/call | ||
| 120 | |||||
| 121 | # making all feature invisible in Language packs and in Help packs! | ||||
| 122 | if ( $installer::globals::languagepack || $installer::globals::helppack ) { $display = "0"; } | ||||
| 123 | |||||
| 124 | return $display | ||||
| 125 | } | ||||
| 126 | |||||
| 127 | ############################################################## | ||||
| 128 | # Returning the level for a feature. | ||||
| 129 | ############################################################## | ||||
| 130 | |||||
| 131 | sub get_feature_level | ||||
| 132 | # spent 1.91s (1.78+126ms) within installer::windows::feature::get_feature_level which was called 169277 times, avg 11µs/call:
# 169277 times (1.78s+126ms) by installer::windows::feature::create_feature_table at line 400, avg 11µs/call | ||||
| 133 | 1525019 | 2.17s | my ($onefeature) = @_; | ||
| 134 | |||||
| 135 | my $level = "20"; # the default | ||||
| 136 | |||||
| 137 | my $localdefault = ""; | ||||
| 138 | |||||
| 139 | if ( $onefeature->{'Default'} ) { $localdefault = $onefeature->{'Default'}; } | ||||
| 140 | |||||
| 141 | if ( $localdefault eq "NO" ) # explicitly set Default = "NO" | ||||
| 142 | { | ||||
| 143 | $level = "200"; # deselected in default installation, base is 100 | ||||
| 144 | if ( $installer::globals::patch ) { $level = "20"; } | ||||
| 145 | } | ||||
| 146 | |||||
| 147 | # special handling for Java and Ada | ||||
| 148 | if ( $onefeature->{'Name'} ) | ||||
| 149 | { | ||||
| 150 | 169277 | 126ms | if ( $onefeature->{'Name'} =~ /java/i ) { $level = $level + 40; } # spent 126ms making 169277 calls to installer::windows::feature::CORE:match, avg 747ns/call | ||
| 151 | } | ||||
| 152 | |||||
| 153 | # if FeatureLevel is defined in scp, this will be used | ||||
| 154 | |||||
| 155 | if ( $onefeature->{'FeatureLevel'} ) { $level = $onefeature->{'FeatureLevel'}; } | ||||
| 156 | |||||
| 157 | return $level | ||||
| 158 | } | ||||
| 159 | |||||
| 160 | ############################################################## | ||||
| 161 | # Returning the directory for a feature. | ||||
| 162 | ############################################################## | ||||
| 163 | |||||
| 164 | sub get_feature_directory | ||||
| 165 | # spent 684ms within installer::windows::feature::get_feature_directory which was called 169277 times, avg 4µs/call:
# 169277 times (684ms+0s) by installer::windows::feature::create_feature_table at line 401, avg 4µs/call | ||||
| 166 | 677108 | 985ms | my ($onefeature) = @_; | ||
| 167 | |||||
| 168 | my $directory; | ||||
| 169 | |||||
| 170 | $directory = "INSTALLLOCATION"; | ||||
| 171 | |||||
| 172 | return $directory | ||||
| 173 | } | ||||
| 174 | |||||
| 175 | ############################################################## | ||||
| 176 | # Returning the directory for a feature. | ||||
| 177 | ############################################################## | ||||
| 178 | |||||
| 179 | sub get_feature_attributes | ||||
| 180 | # spent 1.13s within installer::windows::feature::get_feature_attributes which was called 169277 times, avg 7µs/call:
# 169277 times (1.13s+0s) by installer::windows::feature::create_feature_table at line 402, avg 7µs/call | ||||
| 181 | 1182868 | 1.45s | my ($onefeature) = @_; | ||
| 182 | |||||
| 183 | my $attributes; | ||||
| 184 | |||||
| 185 | # No advertising of features and no leaving on network. | ||||
| 186 | # Feature without parent must not have the "2" | ||||
| 187 | |||||
| 188 | my $parentgid = ""; | ||||
| 189 | if ( $onefeature->{'ParentID'} ) { $parentgid = $onefeature->{'ParentID'}; } | ||||
| 190 | |||||
| 191 | if (( $parentgid eq "" ) || ( $parentgid eq $installer::globals::rootmodulegid )) { $attributes = "8"; } | ||||
| 192 | else { $attributes = "10"; } | ||||
| 193 | |||||
| 194 | return $attributes | ||||
| 195 | } | ||||
| 196 | |||||
| 197 | ################################################################################# | ||||
| 198 | # Replacing one variable in one files | ||||
| 199 | ################################################################################# | ||||
| 200 | |||||
| 201 | sub replace_one_variable | ||||
| 202 | { | ||||
| 203 | my ($translationfile, $variable, $searchstring) = @_; | ||||
| 204 | |||||
| 205 | for ( my $i = 0; $i <= $#{$translationfile}; $i++ ) | ||||
| 206 | { | ||||
| 207 | ${$translationfile}[$i] =~ s/\%$searchstring/$variable/g; | ||||
| 208 | } | ||||
| 209 | } | ||||
| 210 | |||||
| 211 | ################################################################################# | ||||
| 212 | # Replacing the variables in the feature names and descriptions | ||||
| 213 | ################################################################################# | ||||
| 214 | |||||
| 215 | sub replace_variables | ||||
| 216 | { | ||||
| 217 | my ($translationfile, $variableshashref) = @_; | ||||
| 218 | |||||
| 219 | # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes | ||||
| 220 | foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref}) | ||||
| 221 | { | ||||
| 222 | my $value = $variableshashref->{$key}; | ||||
| 223 | replace_one_variable($translationfile, $value, $key); | ||||
| 224 | } | ||||
| 225 | } | ||||
| 226 | |||||
| 227 | ################################################################################# | ||||
| 228 | # Collecting the feature recursively. | ||||
| 229 | ################################################################################# | ||||
| 230 | |||||
| 231 | sub collect_modules_recursive | ||||
| 232 | # spent -322s (-322+5.89ms) within installer::windows::feature::collect_modules_recursive which was called 1554 times, avg -207ms/call:
# 1553 times (-322s+322s) by installer::windows::feature::collect_modules_recursive at line 275, avg 0s/call
# once (79.8ms+-322s) by installer::windows::feature::sort_feature at line 325 | ||||
| 233 | 56270091 | 108s | my ($modulesref, $parentid, $feature, $directaccess, $directgid, $directparent, $directsortkey, $sorted) = @_; | ||
| 234 | |||||
| 235 | my @allchildren = (); | ||||
| 236 | my $childrenexist = 0; | ||||
| 237 | |||||
| 238 | # Collecting children from Module $parentid | ||||
| 239 | |||||
| 240 | my $modulegid; | ||||
| 241 | foreach $modulegid ( keys %{$directparent}) | ||||
| 242 | { | ||||
| 243 | if ( $directparent->{$modulegid} eq $parentid ) | ||||
| 244 | { | ||||
| 245 | push @allchildren, [ $directsortkey->{$modulegid}, $modulegid ]; | ||||
| 246 | $childrenexist = 1; | ||||
| 247 | } | ||||
| 248 | } | ||||
| 249 | |||||
| 250 | # Sorting children | ||||
| 251 | |||||
| 252 | if ( $childrenexist ) | ||||
| 253 | { | ||||
| 254 | # Sort children | ||||
| 255 | @allchildren = map { $_->[1] } | ||||
| 256 | 242 | 5.89ms | sort { $a->[0] <=> $b->[0] } # spent 5.89ms making 242 calls to installer::windows::feature::CORE:sort, avg 24µs/call | ||
| 257 | @allchildren; | ||||
| 258 | |||||
| 259 | # Adding children to new array | ||||
| 260 | foreach my $gid ( @allchildren ) | ||||
| 261 | { | ||||
| 262 | # Saving all lines, that have this 'gid' | ||||
| 263 | |||||
| 264 | my $unique; | ||||
| 265 | foreach $unique ( keys %{$directgid} ) | ||||
| 266 | { | ||||
| 267 | if ( $directgid->{$unique} eq $gid ) | ||||
| 268 | { | ||||
| 269 | push(@{$feature}, ${$modulesref}[$directaccess->{$unique}]); | ||||
| 270 | if ( $sorted->{$unique} == 1 ) { installer::exiter::exit_program("ERROR: Sorting feature failed! \"$unique\" already sorted.", "sort_feature"); } | ||||
| 271 | $sorted->{$unique} = 1; | ||||
| 272 | } | ||||
| 273 | } | ||||
| 274 | |||||
| 275 | 1553 | 0s | collect_modules_recursive($modulesref, $gid, $feature, $directaccess, $directgid, $directparent, $directsortkey, $sorted); # spent - 119s making 1553 calls to installer::windows::feature::collect_modules_recursive, avg -76.9ms/call, recursion: max depth 5, sum of overlapping time -119s | ||
| 276 | } | ||||
| 277 | } | ||||
| 278 | } | ||||
| 279 | |||||
| 280 | ################################################################################# | ||||
| 281 | # Sorting the feature in specified order. Evaluated is the key "Sortkey", that | ||||
| 282 | # is set in scp2 projects. | ||||
| 283 | # The display order of modules in Windows Installer is dependent from the order | ||||
| 284 | # in the idt file. Therefore the order of the modules array has to be adapted | ||||
| 285 | # to the Sortkey order, before the idt file is created. | ||||
| 286 | ################################################################################# | ||||
| 287 | |||||
| 288 | sub sort_feature | ||||
| 289 | # spent -321s (492ms+-322) within installer::windows::feature::sort_feature which was called:
# once (492ms+-322s) by installer::run at line 1506 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 290 | 312543 | 492ms | my ($modulesref) = @_; | ||
| 291 | |||||
| 292 | my @feature = (); | ||||
| 293 | |||||
| 294 | my %directaccess = (); | ||||
| 295 | my %directparent = (); | ||||
| 296 | my %directgid = (); | ||||
| 297 | my %directsortkey = (); | ||||
| 298 | my %sorted = (); | ||||
| 299 | |||||
| 300 | for ( my $i = 0; $i <= $#{$modulesref}; $i++ ) | ||||
| 301 | { | ||||
| 302 | my $onefeature = ${$modulesref}[$i]; | ||||
| 303 | |||||
| 304 | my $uniquekey = $onefeature->{'uniquekey'}; | ||||
| 305 | my $modulegid = $onefeature->{'gid'}; | ||||
| 306 | |||||
| 307 | $directaccess{$uniquekey} = $i; | ||||
| 308 | |||||
| 309 | $directgid{$uniquekey} = $onefeature->{'gid'}; | ||||
| 310 | |||||
| 311 | # ParentID and Sortkey are not saved for the 'uniquekey', but only for the 'gid' | ||||
| 312 | |||||
| 313 | if ( $onefeature->{'ParentID'} ) { $directparent{$modulegid} = $onefeature->{'ParentID'}; } | ||||
| 314 | else { $directparent{$modulegid} = ""; } | ||||
| 315 | |||||
| 316 | if ( $onefeature->{'Sortkey'} ) { $directsortkey{$modulegid} = $onefeature->{'Sortkey'}; } | ||||
| 317 | else { $directsortkey{$modulegid} = "9999"; } | ||||
| 318 | |||||
| 319 | # Bookkeeping: | ||||
| 320 | $sorted{$uniquekey} = 0; | ||||
| 321 | } | ||||
| 322 | |||||
| 323 | # Searching all feature recursively, beginning with ParentID = "" | ||||
| 324 | my $parentid = ""; | ||||
| 325 | 1 | -322s | collect_modules_recursive($modulesref, $parentid, \@feature, \%directaccess, \%directgid, \%directparent, \%directsortkey, \%sorted); # spent - 322s making 1 call to installer::windows::feature::collect_modules_recursive | ||
| 326 | |||||
| 327 | # Bookkeeping | ||||
| 328 | my $modulekey; | ||||
| 329 | foreach $modulekey ( keys %sorted ) | ||||
| 330 | { | ||||
| 331 | if ( $sorted{$modulekey} == 0 ) | ||||
| 332 | { | ||||
| 333 | my $infoline = "Warning: Module \"$modulekey\" could not be sorted. Added to the end of the module array.\n"; | ||||
| 334 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 335 | push(@feature, ${$modulesref}[$directaccess{$modulekey}]); | ||||
| 336 | } | ||||
| 337 | } | ||||
| 338 | |||||
| 339 | return \@feature; | ||||
| 340 | } | ||||
| 341 | |||||
| 342 | ################################################################################# | ||||
| 343 | # Adding a unique key to the modules array. The gid is not unique for | ||||
| 344 | # multilingual modules. Only the combination from gid and specific language | ||||
| 345 | # is unique. Uniqueness is required for sorting mechanism. | ||||
| 346 | ################################################################################# | ||||
| 347 | |||||
| 348 | sub add_uniquekey | ||||
| 349 | # spent 165ms within installer::windows::feature::add_uniquekey which was called:
# once (165ms+0s) by installer::run at line 1505 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 350 | 103805 | 165ms | my ( $modulesref ) = @_; | ||
| 351 | |||||
| 352 | for ( my $i = 0; $i <= $#{$modulesref}; $i++ ) | ||||
| 353 | { | ||||
| 354 | my $uniquekey = ${$modulesref}[$i]->{'gid'}; | ||||
| 355 | if ( ${$modulesref}[$i]->{'specificlanguage'} ) { $uniquekey = $uniquekey . "_" . ${$modulesref}[$i]->{'specificlanguage'}; } | ||||
| 356 | ${$modulesref}[$i]->{'uniquekey'} = $uniquekey; | ||||
| 357 | } | ||||
| 358 | } | ||||
| 359 | |||||
| 360 | ################################################################################# | ||||
| 361 | # Creating the file Feature.idt dynamically | ||||
| 362 | # Content: | ||||
| 363 | # Feature Feature_Parent Title Description Display Level Directory_ Attributes | ||||
| 364 | ################################################################################# | ||||
| 365 | |||||
| 366 | sub create_feature_table | ||||
| 367 | # spent -154s (-178+23.8) within installer::windows::feature::create_feature_table which was called:
# once (-178s+23.8s) by installer::run at line 1507 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 368 | 47259485 | 252s | my ($modulesref, $basedir, $languagesarrayref, $allvariableshashref) = @_; | ||
| 369 | |||||
| 370 | for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ ) | ||||
| 371 | { | ||||
| 372 | my $onelanguage = ${$languagesarrayref}[$m]; | ||||
| 373 | |||||
| 374 | my $infoline; | ||||
| 375 | |||||
| 376 | my @featuretable = (); | ||||
| 377 | |||||
| 378 | 109 | 3.11ms | installer::windows::idtglobal::write_idt_header(\@featuretable, "feature"); # spent 3.11ms making 109 calls to installer::windows::idtglobal::write_idt_header, avg 29µs/call | ||
| 379 | |||||
| 380 | for ( my $i = 0; $i <= $#{$modulesref}; $i++ ) | ||||
| 381 | { | ||||
| 382 | my $onefeature = ${$modulesref}[$i]; | ||||
| 383 | |||||
| 384 | # Java and Ada only, if the correct settings are set | ||||
| 385 | my $styles = ""; | ||||
| 386 | if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; } | ||||
| 387 | |||||
| 388 | # Controlling the language! | ||||
| 389 | # Only language independent feature or feature with the correct language will be included into the table | ||||
| 390 | |||||
| 391 | if (! (!(( $onefeature->{'ismultilingual'} )) || ( $onefeature->{'specificlanguage'} eq $onelanguage )) ) { next; } | ||||
| 392 | |||||
| 393 | my %feature = (); | ||||
| 394 | |||||
| 395 | 169277 | 7.66s | $feature{'feature'} = get_feature_gid($onefeature); # spent 7.66s making 169277 calls to installer::windows::feature::get_feature_gid, avg 45µs/call | ||
| 396 | 169277 | 7.60s | $feature{'feature_parent'} = get_feature_parent($onefeature); # spent 7.60s making 169277 calls to installer::windows::feature::get_feature_parent, avg 45µs/call | ||
| 397 | $feature{'Title'} = $onefeature->{'Name'}; | ||||
| 398 | $feature{'Description'} = $onefeature->{'Description'}; | ||||
| 399 | 169277 | 3.17s | $feature{'Display'} = get_feature_display($onefeature); # spent 3.17s making 169277 calls to installer::windows::feature::get_feature_display, avg 19µs/call | ||
| 400 | 169277 | 1.91s | $feature{'Level'} = get_feature_level($onefeature); # spent 1.91s making 169277 calls to installer::windows::feature::get_feature_level, avg 11µs/call | ||
| 401 | 169277 | 684ms | $feature{'Directory_'} = get_feature_directory($onefeature); # spent 684ms making 169277 calls to installer::windows::feature::get_feature_directory, avg 4µs/call | ||
| 402 | 169277 | 1.13s | $feature{'Attributes'} = get_feature_attributes($onefeature); # spent 1.13s making 169277 calls to installer::windows::feature::get_feature_attributes, avg 7µs/call | ||
| 403 | |||||
| 404 | my $oneline = $feature{'feature'} . "\t" . $feature{'feature_parent'} . "\t" . $feature{'Title'} . "\t" | ||||
| 405 | . $feature{'Description'} . "\t" . $feature{'Display'} . "\t" . $feature{'Level'} . "\t" | ||||
| 406 | . $feature{'Directory_'} . "\t" . $feature{'Attributes'} . "\n"; | ||||
| 407 | |||||
| 408 | push(@featuretable, $oneline); | ||||
| 409 | |||||
| 410 | # collecting all feature in global feature collector (so that properties can be set in property table) | ||||
| 411 | if ( ! grep {$_ eq $feature{'feature'}} @installer::globals::featurecollector ) | ||||
| 412 | { | ||||
| 413 | push(@installer::globals::featurecollector, $feature{'feature'}); | ||||
| 414 | } | ||||
| 415 | |||||
| 416 | # collecting all language feature in feature collector for check of language selection | ||||
| 417 | 169277 | 168ms | if (( $styles =~ /\bSHOW_MULTILINGUAL_ONLY\b/ ) && ( $onefeature->{'ParentID'} ne $installer::globals::rootmodulegid )) # spent 168ms making 169277 calls to installer::windows::feature::CORE:match, avg 990ns/call | ||
| 418 | { | ||||
| 419 | $installer::globals::multilingual_only_modules{$feature{'feature'}} = 1; | ||||
| 420 | } | ||||
| 421 | |||||
| 422 | # collecting all application feature in global feature collector for check of application selection | ||||
| 423 | 169277 | 85.3ms | if ( $styles =~ /\bAPPLICATIONMODULE\b/ ) # spent 85.3ms making 169277 calls to installer::windows::feature::CORE:match, avg 504ns/call | ||
| 424 | { | ||||
| 425 | $installer::globals::application_modules{$feature{'feature'}} = 1; | ||||
| 426 | } | ||||
| 427 | } | ||||
| 428 | |||||
| 429 | # Sorting names of language packs and dictionaries | ||||
| 430 | my @tempfeaturetable; | ||||
| 431 | my @langlist; | ||||
| 432 | my @langpack; | ||||
| 433 | my @dictlist; | ||||
| 434 | my @sorteddictlist; | ||||
| 435 | my @sortedlanglist; | ||||
| 436 | |||||
| 437 | foreach (@featuretable) { | ||||
| 438 | 496931 | 508ms | if (/^gm_r_Extension_Dictionary_/) { # spent 508ms making 496931 calls to installer::windows::feature::CORE:match, avg 1µs/call | ||
| 439 | push (@dictlist, $_); | ||||
| 440 | } | ||||
| 441 | elsif (/^gm_Langpack_r_/) { | ||||
| 442 | push (@langlist, $_); | ||||
| 443 | } | ||||
| 444 | elsif (/\tgm_Langpack_r_/) { | ||||
| 445 | push (@langpack, $_); | ||||
| 446 | } | ||||
| 447 | else { | ||||
| 448 | push (@tempfeaturetable, $_); | ||||
| 449 | } | ||||
| 450 | } | ||||
| 451 | |||||
| 452 | 109 | 887µs | @sorteddictlist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @dictlist; # spent 887µs making 109 calls to installer::windows::feature::CORE:sort, avg 8µs/call | ||
| 453 | 109 | 688ms | @sortedlanglist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @langlist; # spent 688ms making 109 calls to installer::windows::feature::CORE:sort, avg 6.31ms/call | ||
| 454 | |||||
| 455 | @featuretable = (@tempfeaturetable, @sorteddictlist); | ||||
| 456 | |||||
| 457 | foreach (@sortedlanglist) { | ||||
| 458 | my $sortedlanglistline = $_; | ||||
| 459 | push (@featuretable, $sortedlanglistline); | ||||
| 460 | foreach (@langpack) { | ||||
| 461 | my $langpackline = $_; | ||||
| 462 | if ( (split(/\t/, $langpackline))[1] eq (split(/\t/, $sortedlanglistline))[0] ) { | ||||
| 463 | push (@featuretable, $langpackline); | ||||
| 464 | } | ||||
| 465 | } | ||||
| 466 | } | ||||
| 467 | |||||
| 468 | # Saving the file | ||||
| 469 | |||||
| 470 | my $featuretablename = $basedir . $installer::globals::separator . "Feature.idt" . "." . $onelanguage; | ||||
| 471 | 109 | 227ms | installer::files::save_file($featuretablename ,\@featuretable); # spent 227ms making 109 calls to installer::files::save_file, avg 2.09ms/call | ||
| 472 | $infoline = "Created idt file: $featuretablename\n"; | ||||
| 473 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 474 | } | ||||
| 475 | |||||
| 476 | } | ||||
| 477 | |||||
| 478 | 1 | 9µs | 1; | ||
# spent 1.39s within installer::windows::feature::CORE:match which was called 1343425 times, avg 1µs/call:
# 496931 times (508ms+0s) by installer::windows::feature::create_feature_table at line 438, avg 1µs/call
# 169277 times (389ms+0s) by installer::windows::feature::get_feature_display at line 113, avg 2µs/call
# 169277 times (168ms+0s) by installer::windows::feature::create_feature_table at line 417, avg 990ns/call
# 169277 times (126ms+0s) by installer::windows::feature::get_feature_level at line 150, avg 747ns/call
# 169277 times (115ms+0s) by installer::windows::feature::get_feature_display at line 116, avg 679ns/call
# 169277 times (85.3ms+0s) by installer::windows::feature::create_feature_table at line 423, avg 504ns/call
# 109 times (117µs+0s) by installer::windows::feature::get_feature_display at line 119, avg 1µs/call | |||||
# spent 694ms within installer::windows::feature::CORE:sort which was called 460 times, avg 1.51ms/call:
# 242 times (5.89ms+0s) by installer::windows::feature::collect_modules_recursive at line 256, avg 24µs/call
# 109 times (688ms+0s) by installer::windows::feature::create_feature_table at line 453, avg 6.31ms/call
# 109 times (887µs+0s) by installer::windows::feature::create_feature_table at line 452, avg 8µs/call |