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 | get_feature_display | installer::windows::feature::
169277 | 1 | 1 | 1.78s | 1.91s | get_feature_level | installer::windows::feature::
169277 | 1 | 1 | 1.64s | 7.60s | get_feature_parent | installer::windows::feature::
169277 | 1 | 1 | 1.60s | 7.66s | get_feature_gid | installer::windows::feature::
1343425 | 7 | 1 | 1.39s | 1.39s | CORE:match (opcode) | installer::windows::feature::
169277 | 1 | 1 | 1.13s | 1.13s | get_feature_attributes | installer::windows::feature::
460 | 3 | 1 | 694ms | 694ms | CORE:sort (opcode) | installer::windows::feature::
169277 | 1 | 1 | 684ms | 684ms | get_feature_directory | installer::windows::feature::
1 | 1 | 1 | 492ms | -321s | sort_feature | installer::windows::feature::
1 | 1 | 1 | 165ms | 165ms | add_uniquekey | installer::windows::feature::
1 | 1 | 1 | 763µs | 773µs | BEGIN@30 | installer::windows::feature::
1 | 1 | 1 | 23µs | 25µs | BEGIN@33 | installer::windows::feature::
1 | 1 | 1 | 18µs | 21µs | BEGIN@31 | installer::windows::feature::
1 | 1 | 1 | 17µs | 19µs | BEGIN@32 | installer::windows::feature::
1 | 1 | 1 | 16µs | 18µs | BEGIN@35 | installer::windows::feature::
1 | 1 | 1 | 15µs | 18µs | BEGIN@34 | installer::windows::feature::
0 | 0 | 0 | 0s | 0s | replace_one_variable | installer::windows::feature::
0 | 0 | 0 | 0s | 0s | replace_variables | installer::windows::feature::
1 | 1 | 1 | -178s | -154s | create_feature_table | installer::windows::feature::
1554 | 2 | 1 | -322s | -322s | collect_modules_recursive (recurses: max depth 5, inclusive time -119s) | installer::windows::feature::
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 | 169277 | 116ms | my ($onefeature) = @_; | ||
45 | |||||
46 | 169277 | 82.1ms | my $gid = ""; | ||
47 | |||||
48 | 169277 | 164ms | if ( $onefeature->{'gid'} ) { $gid = $onefeature->{'gid'}; } | ||
49 | |||||
50 | # Attention: Maximum feature length is 38! | ||||
51 | 169277 | 424ms | 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 | 169277 | 753ms | 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 | 169277 | 126ms | my ($onefeature) = @_; | ||
64 | |||||
65 | 169277 | 83.4ms | my $parentgid = ""; | ||
66 | |||||
67 | 169277 | 177ms | 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 | 169277 | 86.9ms | if ( $parentgid eq $installer::globals::rootmodulegid ) { $parentgid = ""; } | ||
74 | |||||
75 | # Attention: Maximum feature length is 38! | ||||
76 | 169277 | 400ms | 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 | 169277 | 730ms | 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 | 169277 | 123ms | my ($onefeature) = @_; | ||
91 | |||||
92 | 169277 | 61.6ms | my $display; | ||
93 | 169277 | 83.1ms | my $parentid = ""; | ||
94 | |||||
95 | 169277 | 130ms | if ( $onefeature->{'ParentID'} ) { $parentid = $onefeature->{'ParentID'}; } | ||
96 | |||||
97 | 169277 | 206ms | 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 | 169059 | 99.5ms | $display = "2"; # all other modules do not show subfeatures | ||
108 | } | ||||
109 | |||||
110 | # special case: Feature has flag "HIDDEN_ROOT" -> $display is 0 | ||||
111 | 169277 | 73.5ms | my $styles = ""; | ||
112 | 169277 | 118ms | if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; } | ||
113 | 169277 | 1.00s | 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 | 606ms | 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 | 169277 | 109ms | 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 | 169277 | 80.6ms | if ( $installer::globals::languagepack || $installer::globals::helppack ) { $display = "0"; } | ||
123 | |||||
124 | 169277 | 774ms | 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 | 169277 | 128ms | my ($onefeature) = @_; | ||
134 | |||||
135 | 169277 | 79.5ms | my $level = "20"; # the default | ||
136 | |||||
137 | 169277 | 70.6ms | my $localdefault = ""; | ||
138 | |||||
139 | 169277 | 103ms | if ( $onefeature->{'Default'} ) { $localdefault = $onefeature->{'Default'}; } | ||
140 | |||||
141 | 169277 | 77.9ms | if ( $localdefault eq "NO" ) # explicitly set Default = "NO" | ||
142 | { | ||||
143 | 763 | 360µs | $level = "200"; # deselected in default installation, base is 100 | ||
144 | 763 | 380µs | if ( $installer::globals::patch ) { $level = "20"; } | ||
145 | } | ||||
146 | |||||
147 | # special handling for Java and Ada | ||||
148 | 169277 | 164ms | if ( $onefeature->{'Name'} ) | ||
149 | { | ||||
150 | 169277 | 712ms | 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 | 169277 | 111ms | if ( $onefeature->{'FeatureLevel'} ) { $level = $onefeature->{'FeatureLevel'}; } | ||
156 | |||||
157 | 169277 | 727ms | 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 | 169277 | 120ms | my ($onefeature) = @_; | ||
167 | |||||
168 | 169277 | 59.9ms | my $directory; | ||
169 | |||||
170 | 169277 | 78.2ms | $directory = "INSTALLLOCATION"; | ||
171 | |||||
172 | 169277 | 727ms | 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 | 169277 | 115ms | my ($onefeature) = @_; | ||
182 | |||||
183 | 169277 | 61.5ms | my $attributes; | ||
184 | |||||
185 | # No advertising of features and no leaving on network. | ||||
186 | # Feature without parent must not have the "2" | ||||
187 | |||||
188 | 169277 | 77.3ms | my $parentgid = ""; | ||
189 | 169277 | 140ms | if ( $onefeature->{'ParentID'} ) { $parentgid = $onefeature->{'ParentID'}; } | ||
190 | |||||
191 | 169277 | 190ms | if (( $parentgid eq "" ) || ( $parentgid eq $installer::globals::rootmodulegid )) { $attributes = "8"; } | ||
192 | 167206 | 87.0ms | else { $attributes = "10"; } | ||
193 | |||||
194 | 169277 | 783ms | 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 | 1554 | 9.25ms | my ($modulesref, $parentid, $feature, $directaccess, $directgid, $directparent, $directsortkey, $sorted) = @_; | ||
234 | |||||
235 | 1554 | 2.77ms | my @allchildren = (); | ||
236 | 1554 | 1.83ms | my $childrenexist = 0; | ||
237 | |||||
238 | # Collecting children from Module $parentid | ||||
239 | |||||
240 | 1554 | 926µs | my $modulegid; | ||
241 | 1554 | 1.06s | foreach $modulegid ( keys %{$directparent}) | ||
242 | { | ||||
243 | 2413362 | 2.88s | if ( $directparent->{$modulegid} eq $parentid ) | ||
244 | { | ||||
245 | 1553 | 5.50ms | push @allchildren, [ $directsortkey->{$modulegid}, $modulegid ]; | ||
246 | 1553 | 784µs | $childrenexist = 1; | ||
247 | } | ||||
248 | } | ||||
249 | |||||
250 | # Sorting children | ||||
251 | |||||
252 | 1554 | 28.1ms | if ( $childrenexist ) | ||
253 | { | ||||
254 | # Sort children | ||||
255 | @allchildren = map { $_->[1] } | ||||
256 | 242 | 14.0ms | 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 | 242 | 618µs | foreach my $gid ( @allchildren ) | ||
261 | { | ||||
262 | # Saving all lines, that have this 'gid' | ||||
263 | |||||
264 | 1553 | 835µs | my $unique; | ||
265 | 1553 | 29.1s | foreach $unique ( keys %{$directgid} ) | ||
266 | { | ||||
267 | 53735353 | 74.5s | if ( $directgid->{$unique} eq $gid ) | ||
268 | { | ||||
269 | 34601 | 57.6ms | push(@{$feature}, ${$modulesref}[$directaccess->{$unique}]); | ||
270 | 34601 | 25.3ms | if ( $sorted->{$unique} == 1 ) { installer::exiter::exit_program("ERROR: Sorting feature failed! \"$unique\" already sorted.", "sort_feature"); } | ||
271 | 34601 | 23.5ms | $sorted->{$unique} = 1; | ||
272 | } | ||||
273 | } | ||||
274 | |||||
275 | 1553 | 24.0ms | 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 | 1 | 3µs | my ($modulesref) = @_; | ||
291 | |||||
292 | 1 | 2µs | my @feature = (); | ||
293 | |||||
294 | 1 | 2µs | my %directaccess = (); | ||
295 | 1 | 500ns | my %directparent = (); | ||
296 | 1 | 1µs | my %directgid = (); | ||
297 | 1 | 1µs | my %directsortkey = (); | ||
298 | 1 | 1µs | my %sorted = (); | ||
299 | |||||
300 | 1 | 36.1ms | for ( my $i = 0; $i <= $#{$modulesref}; $i++ ) | ||
301 | { | ||||
302 | 34601 | 21.8ms | my $onefeature = ${$modulesref}[$i]; | ||
303 | |||||
304 | 34601 | 27.0ms | my $uniquekey = $onefeature->{'uniquekey'}; | ||
305 | 34601 | 32.8ms | my $modulegid = $onefeature->{'gid'}; | ||
306 | |||||
307 | 34601 | 70.4ms | $directaccess{$uniquekey} = $i; | ||
308 | |||||
309 | 34601 | 54.2ms | $directgid{$uniquekey} = $onefeature->{'gid'}; | ||
310 | |||||
311 | # ParentID and Sortkey are not saved for the 'uniquekey', but only for the 'gid' | ||||
312 | |||||
313 | 34601 | 43.6ms | if ( $onefeature->{'ParentID'} ) { $directparent{$modulegid} = $onefeature->{'ParentID'}; } | ||
314 | 109 | 71µs | else { $directparent{$modulegid} = ""; } | ||
315 | |||||
316 | 34601 | 36.4ms | if ( $onefeature->{'Sortkey'} ) { $directsortkey{$modulegid} = $onefeature->{'Sortkey'}; } | ||
317 | 1012 | 859µs | else { $directsortkey{$modulegid} = "9999"; } | ||
318 | |||||
319 | # Bookkeeping: | ||||
320 | 34601 | 37.9ms | $sorted{$uniquekey} = 0; | ||
321 | } | ||||
322 | |||||
323 | # Searching all feature recursively, beginning with ParentID = "" | ||||
324 | 1 | 2µs | my $parentid = ""; | ||
325 | 1 | 16µs | 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 | 1 | 1µs | my $modulekey; | ||
329 | 1 | 19.1ms | foreach $modulekey ( keys %sorted ) | ||
330 | { | ||||
331 | 34601 | 41.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 | |||||
339 | 1 | 70.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 | |||||
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 | 1 | 3µs | my ( $modulesref ) = @_; | ||
351 | |||||
352 | 1 | 42.9ms | for ( my $i = 0; $i <= $#{$modulesref}; $i++ ) | ||
353 | { | ||||
354 | 34601 | 41.4ms | my $uniquekey = ${$modulesref}[$i]->{'gid'}; | ||
355 | 34601 | 37.6ms | if ( ${$modulesref}[$i]->{'specificlanguage'} ) { $uniquekey = $uniquekey . "_" . ${$modulesref}[$i]->{'specificlanguage'}; } | ||
356 | 34601 | 43.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 | |||||
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 | 1 | 8µs | my ($modulesref, $basedir, $languagesarrayref, $allvariableshashref) = @_; | ||
369 | |||||
370 | 1 | 521µs | for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ ) | ||
371 | { | ||||
372 | 109 | 366µs | my $onelanguage = ${$languagesarrayref}[$m]; | ||
373 | |||||
374 | 109 | 40µs | my $infoline; | ||
375 | |||||
376 | 109 | 175µs | my @featuretable = (); | ||
377 | |||||
378 | 109 | 880µs | 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 | 109 | 2.46s | for ( my $i = 0; $i <= $#{$modulesref}; $i++ ) | ||
381 | { | ||||
382 | 3771509 | 2.20s | my $onefeature = ${$modulesref}[$i]; | ||
383 | |||||
384 | # Java and Ada only, if the correct settings are set | ||||
385 | 3771509 | 1.63s | my $styles = ""; | ||
386 | 3771509 | 4.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 | |||||
391 | 7373741 | 6.01s | if (! (!(( $onefeature->{'ismultilingual'} )) || ( $onefeature->{'specificlanguage'} eq $onelanguage )) ) { next; } | ||
392 | |||||
393 | 169277 | 114ms | my %feature = (); | ||
394 | |||||
395 | 169277 | 553ms | 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 | 523ms | 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 | 169277 | 268ms | $feature{'Title'} = $onefeature->{'Name'}; | ||
398 | 169277 | 215ms | $feature{'Description'} = $onefeature->{'Description'}; | ||
399 | 169277 | 488ms | 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 | 509ms | 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 | 483ms | 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 | 486ms | 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 | 169277 | 500ms | 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 | 169277 | 202ms | push(@featuretable, $oneline); | ||
409 | |||||
410 | # collecting all feature in global feature collector (so that properties can be set in property table) | ||||
411 | 169277 | 50.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 | ||||
417 | 169277 | 793ms | 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 | 1.27s | 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 | 109 | 48µs | my @tempfeaturetable; | ||
431 | 109 | 62µs | my @langlist; | ||
432 | 109 | 59µs | my @langpack; | ||
433 | 109 | 40µs | my @dictlist; | ||
434 | 109 | 33µs | my @sorteddictlist; | ||
435 | 109 | 49µs | my @sortedlanglist; | ||
436 | |||||
437 | 109 | 513µs | foreach (@featuretable) { | ||
438 | 169604 | 2.01s | 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 | 38913 | 48.7ms | push (@tempfeaturetable, $_); | ||
449 | } | ||||
450 | } | ||||
451 | |||||
452 | 109 | 1.63ms | 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 | 54526 | 698ms | 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 | 109 | 93.9ms | @featuretable = (@tempfeaturetable, @sorteddictlist); | ||
456 | |||||
457 | 109 | 320µs | foreach (@sortedlanglist) { | ||
458 | 11881 | 7.97ms | my $sortedlanglistline = $_; | ||
459 | 11881 | 14.3ms | push (@featuretable, $sortedlanglistline); | ||
460 | 11881 | 25.0ms | foreach (@langpack) { | ||
461 | 12950290 | 6.10s | my $langpackline = $_; | ||
462 | 12950290 | 169s | if ( (split(/\t/, $langpackline))[1] eq (split(/\t/, $sortedlanglistline))[0] ) { | ||
463 | push (@featuretable, $langpackline); | ||||
464 | } | ||||
465 | } | ||||
466 | } | ||||
467 | |||||
468 | # Saving the file | ||||
469 | |||||
470 | 109 | 501µs | my $featuretablename = $basedir . $installer::globals::separator . "Feature.idt" . "." . $onelanguage; | ||
471 | 109 | 1.38ms | 109 | 227ms | installer::files::save_file($featuretablename ,\@featuretable); # spent 227ms making 109 calls to installer::files::save_file, avg 2.09ms/call |
472 | 109 | 245µs | $infoline = "Created idt file: $featuretablename\n"; | ||
473 | 109 | 163ms | 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 |