← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:53 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/feature.pm
StatementsExecuted 111393362 statements in 371s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
169277112.66s3.17sinstaller::windows::feature::::get_feature_displayinstaller::windows::feature::get_feature_display
169277111.78s1.91sinstaller::windows::feature::::get_feature_levelinstaller::windows::feature::get_feature_level
169277111.64s7.60sinstaller::windows::feature::::get_feature_parentinstaller::windows::feature::get_feature_parent
169277111.60s7.66sinstaller::windows::feature::::get_feature_gidinstaller::windows::feature::get_feature_gid
1343425711.39s1.39sinstaller::windows::feature::::CORE:matchinstaller::windows::feature::CORE:match (opcode)
169277111.13s1.13sinstaller::windows::feature::::get_feature_attributesinstaller::windows::feature::get_feature_attributes
46031694ms694msinstaller::windows::feature::::CORE:sortinstaller::windows::feature::CORE:sort (opcode)
16927711684ms684msinstaller::windows::feature::::get_feature_directoryinstaller::windows::feature::get_feature_directory
111492ms-321sinstaller::windows::feature::::sort_featureinstaller::windows::feature::sort_feature
111165ms165msinstaller::windows::feature::::add_uniquekeyinstaller::windows::feature::add_uniquekey
111763µs773µsinstaller::windows::feature::::BEGIN@30installer::windows::feature::BEGIN@30
11123µs25µsinstaller::windows::feature::::BEGIN@33installer::windows::feature::BEGIN@33
11118µs21µsinstaller::windows::feature::::BEGIN@31installer::windows::feature::BEGIN@31
11117µs19µsinstaller::windows::feature::::BEGIN@32installer::windows::feature::BEGIN@32
11116µs18µsinstaller::windows::feature::::BEGIN@35installer::windows::feature::BEGIN@35
11115µs18µsinstaller::windows::feature::::BEGIN@34installer::windows::feature::BEGIN@34
0000s0sinstaller::windows::feature::::replace_one_variableinstaller::windows::feature::replace_one_variable
0000s0sinstaller::windows::feature::::replace_variablesinstaller::windows::feature::replace_variables
111-178s-154sinstaller::windows::feature::::create_feature_tableinstaller::windows::feature::create_feature_table
155421-322s-322sinstaller::windows::feature::::collect_modules_recursiveinstaller::windows::feature::collect_modules_recursive (recurses: max depth 5, inclusive time -119s)
Call graph for these subroutines as a Graphviz dot language file.
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
28package installer::windows::feature;
29
302130µs2782µ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
use installer::exiter;
# spent 773µs making 1 call to installer::windows::feature::BEGIN@30 # spent 10µs making 1 call to UNIVERSAL::import
31260µs224µ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
use installer::files;
# spent 21µs making 1 call to installer::windows::feature::BEGIN@31 # spent 3µs making 1 call to UNIVERSAL::import
32257µs222µ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
use installer::globals;
# spent 19µs making 1 call to installer::windows::feature::BEGIN@32 # spent 3µs making 1 call to UNIVERSAL::import
33257µs227µ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
use installer::worker;
# spent 25µs making 1 call to installer::windows::feature::BEGIN@33 # spent 2µs making 1 call to UNIVERSAL::import
34256µs222µ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
use installer::windows::idtglobal;
# spent 18µs making 1 call to installer::windows::feature::BEGIN@34 # spent 3µs making 1 call to UNIVERSAL::import
3523.95ms221µ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
use installer::windows::language;
# 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
42sub 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
{
44169277116ms my ($onefeature) = @_;
45
4616927782.1ms my $gid = "";
47
48169277164ms if ( $onefeature->{'gid'} ) { $gid = $onefeature->{'gid'}; }
49
50 # Attention: Maximum feature length is 38!
51169277424ms1692776.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
53169277753ms return $gid
54}
55
56##############################################################
57# Returning the gid of the parent.
58# Attention: Maximum length
59##############################################################
60
61sub 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
{
63169277126ms my ($onefeature) = @_;
64
6516927783.4ms my $parentgid = "";
66
67169277177ms 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
7316927786.9ms if ( $parentgid eq $installer::globals::rootmodulegid ) { $parentgid = ""; }
74
75 # Attention: Maximum feature length is 38!
76169277400ms1692775.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
78169277730ms 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
88sub 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
{
90169277123ms my ($onefeature) = @_;
91
9216927761.6ms my $display;
9316927783.1ms my $parentid = "";
94
95169277130ms if ( $onefeature->{'ParentID'} ) { $parentid = $onefeature->{'ParentID'}; }
96
97169277206ms 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 {
10716905999.5ms $display = "2"; # all other modules do not show subfeatures
108 }
109
110 # special case: Feature has flag "HIDDEN_ROOT" -> $display is 0
11116927773.5ms my $styles = "";
112169277118ms if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
1131692771.00s169277389ms 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
116169277606ms169277115ms 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.
119169277109ms109117µ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!
12216927780.6ms if ( $installer::globals::languagepack || $installer::globals::helppack ) { $display = "0"; }
123
124169277774ms return $display
125}
126
127##############################################################
128# Returning the level for a feature.
129##############################################################
130
131sub 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
{
133169277128ms my ($onefeature) = @_;
134
13516927779.5ms my $level = "20"; # the default
136
13716927770.6ms my $localdefault = "";
138
139169277103ms if ( $onefeature->{'Default'} ) { $localdefault = $onefeature->{'Default'}; }
140
14116927777.9ms if ( $localdefault eq "NO" ) # explicitly set Default = "NO"
142 {
143763360µs $level = "200"; # deselected in default installation, base is 100
144763380µs if ( $installer::globals::patch ) { $level = "20"; }
145 }
146
147 # special handling for Java and Ada
148169277164ms if ( $onefeature->{'Name'} )
149 {
150169277712ms169277126ms 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
155169277111ms if ( $onefeature->{'FeatureLevel'} ) { $level = $onefeature->{'FeatureLevel'}; }
156
157169277727ms return $level
158}
159
160##############################################################
161# Returning the directory for a feature.
162##############################################################
163
164sub 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
{
166169277120ms my ($onefeature) = @_;
167
16816927759.9ms my $directory;
169
17016927778.2ms $directory = "INSTALLLOCATION";
171
172169277727ms return $directory
173}
174
175##############################################################
176# Returning the directory for a feature.
177##############################################################
178
179sub 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
{
181169277115ms my ($onefeature) = @_;
182
18316927761.5ms my $attributes;
184
185 # No advertising of features and no leaving on network.
186 # Feature without parent must not have the "2"
187
18816927777.3ms my $parentgid = "";
189169277140ms if ( $onefeature->{'ParentID'} ) { $parentgid = $onefeature->{'ParentID'}; }
190
191169277190ms if (( $parentgid eq "" ) || ( $parentgid eq $installer::globals::rootmodulegid )) { $attributes = "8"; }
19216720687.0ms else { $attributes = "10"; }
193
194169277783ms return $attributes
195}
196
197#################################################################################
198# Replacing one variable in one files
199#################################################################################
200
201sub 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
215sub 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
231sub 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
{
23315549.25ms my ($modulesref, $parentid, $feature, $directaccess, $directgid, $directparent, $directsortkey, $sorted) = @_;
234
23515542.77ms my @allchildren = ();
23615541.83ms my $childrenexist = 0;
237
238 # Collecting children from Module $parentid
239
2401554926µs my $modulegid;
24115541.06s foreach $modulegid ( keys %{$directparent})
242 {
24324133622.88s if ( $directparent->{$modulegid} eq $parentid )
244 {
24515535.50ms push @allchildren, [ $directsortkey->{$modulegid}, $modulegid ];
2461553784µs $childrenexist = 1;
247 }
248 }
249
250 # Sorting children
251
252155428.1ms if ( $childrenexist )
253 {
254 # Sort children
255 @allchildren = map { $_->[1] }
25624214.0ms2425.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
260242618µs foreach my $gid ( @allchildren )
261 {
262 # Saving all lines, that have this 'gid'
263
2641553835µs my $unique;
265155329.1s foreach $unique ( keys %{$directgid} )
266 {
2675373535374.5s if ( $directgid->{$unique} eq $gid )
268 {
2693460157.6ms push(@{$feature}, ${$modulesref}[$directaccess->{$unique}]);
2703460125.3ms if ( $sorted->{$unique} == 1 ) { installer::exiter::exit_program("ERROR: Sorting feature failed! \"$unique\" already sorted.", "sort_feature"); }
2713460123.5ms $sorted->{$unique} = 1;
272 }
273 }
274
275155324.0ms15530s 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
288sub 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
{
29013µs my ($modulesref) = @_;
291
29212µs my @feature = ();
293
29412µs my %directaccess = ();
2951500ns my %directparent = ();
29611µs my %directgid = ();
29711µs my %directsortkey = ();
29811µs my %sorted = ();
299
300136.1ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
301 {
3023460121.8ms my $onefeature = ${$modulesref}[$i];
303
3043460127.0ms my $uniquekey = $onefeature->{'uniquekey'};
3053460132.8ms my $modulegid = $onefeature->{'gid'};
306
3073460170.4ms $directaccess{$uniquekey} = $i;
308
3093460154.2ms $directgid{$uniquekey} = $onefeature->{'gid'};
310
311 # ParentID and Sortkey are not saved for the 'uniquekey', but only for the 'gid'
312
3133460143.6ms if ( $onefeature->{'ParentID'} ) { $directparent{$modulegid} = $onefeature->{'ParentID'}; }
31410971µs else { $directparent{$modulegid} = ""; }
315
3163460136.4ms if ( $onefeature->{'Sortkey'} ) { $directsortkey{$modulegid} = $onefeature->{'Sortkey'}; }
3171012859µs else { $directsortkey{$modulegid} = "9999"; }
318
319 # Bookkeeping:
3203460137.9ms $sorted{$uniquekey} = 0;
321 }
322
323 # Searching all feature recursively, beginning with ParentID = ""
32412µs my $parentid = "";
325116µs1-322s collect_modules_recursive($modulesref, $parentid, \@feature, \%directaccess, \%directgid, \%directparent, \%directsortkey, \%sorted);
326
327 # Bookkeeping
32811µs my $modulekey;
329119.1ms foreach $modulekey ( keys %sorted )
330 {
3313460141.3ms 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
339170.1ms 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
348sub 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
{
35013µs my ( $modulesref ) = @_;
351
352142.9ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
353 {
3543460141.4ms my $uniquekey = ${$modulesref}[$i]->{'gid'};
3553460137.6ms if ( ${$modulesref}[$i]->{'specificlanguage'} ) { $uniquekey = $uniquekey . "_" . ${$modulesref}[$i]->{'specificlanguage'}; }
3563460143.4ms ${$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
366sub 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
{
36818µs my ($modulesref, $basedir, $languagesarrayref, $allvariableshashref) = @_;
369
3701521µs for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
371 {
372109366µs my $onelanguage = ${$languagesarrayref}[$m];
373
37410940µs my $infoline;
375
376109175µs my @featuretable = ();
377
378109880µs1093.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
3801092.46s for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
381 {
38237715092.20s my $onefeature = ${$modulesref}[$i];
383
384 # Java and Ada only, if the correct settings are set
38537715091.63s my $styles = "";
38637715094.19s 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
39173737416.01s if (! (!(( $onefeature->{'ismultilingual'} )) || ( $onefeature->{'specificlanguage'} eq $onelanguage )) ) { next; }
392
393169277114ms my %feature = ();
394
395169277553ms1692777.66s $feature{'feature'} = get_feature_gid($onefeature);
# spent 7.66s making 169277 calls to installer::windows::feature::get_feature_gid, avg 45µs/call
396169277523ms1692777.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
397169277268ms $feature{'Title'} = $onefeature->{'Name'};
398169277215ms $feature{'Description'} = $onefeature->{'Description'};
399169277488ms1692773.17s $feature{'Display'} = get_feature_display($onefeature);
# spent 3.17s making 169277 calls to installer::windows::feature::get_feature_display, avg 19µs/call
400169277509ms1692771.91s $feature{'Level'} = get_feature_level($onefeature);
# spent 1.91s making 169277 calls to installer::windows::feature::get_feature_level, avg 11µs/call
401169277483ms169277684ms $feature{'Directory_'} = get_feature_directory($onefeature);
# spent 684ms making 169277 calls to installer::windows::feature::get_feature_directory, avg 4µs/call
402169277486ms1692771.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
404169277500ms 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
408169277202ms push(@featuretable, $oneline);
409
410 # collecting all feature in global feature collector (so that properties can be set in property table)
41116927750.3s 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
417169277793ms169277168ms 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
4231692771.27s16927785.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
43010948µs my @tempfeaturetable;
43110962µs my @langlist;
43210959µs my @langpack;
43310940µs my @dictlist;
43410933µs my @sorteddictlist;
43510949µs my @sortedlanglist;
436
437109513µs foreach (@featuretable) {
4381696042.01s496931508ms 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 {
4483891348.7ms push (@tempfeaturetable, $_);
449 }
450 }
451
4521091.63ms109887µ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
45354526698ms109688ms @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
45510993.9ms @featuretable = (@tempfeaturetable, @sorteddictlist);
456
457109320µs foreach (@sortedlanglist) {
458118817.97ms my $sortedlanglistline = $_;
4591188114.3ms push (@featuretable, $sortedlanglistline);
4601188125.0ms foreach (@langpack) {
461129502906.10s my $langpackline = $_;
46212950290169s if ( (split(/\t/, $langpackline))[1] eq (split(/\t/, $sortedlanglistline))[0] ) {
463 push (@featuretable, $langpackline);
464 }
465 }
466 }
467
468 # Saving the file
469
470109501µs my $featuretablename = $basedir . $installer::globals::separator . "Feature.idt" . "." . $onelanguage;
4711091.38ms109227ms installer::files::save_file($featuretablename ,\@featuretable);
# spent 227ms making 109 calls to installer::files::save_file, avg 2.09ms/call
472109245µs $infoline = "Created idt file: $featuretablename\n";
473109163ms push(@installer::globals::logfileinfo, $infoline);
474 }
475
476}
477
47819µs1;
 
# 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
sub installer::windows::feature::CORE:match; # opcode
# 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
sub installer::windows::feature::CORE:sort; # opcode