← 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:55 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/registry.pm
StatementsExecuted 19777828 statements in 41.8s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11113.6s114sinstaller::windows::registry::::create_registry_tableinstaller::windows::registry::create_registry_table
139193118.14s10.5sinstaller::windows::registry::::get_registry_component_nameinstaller::windows::registry::get_registry_component_name
139193117.53s9.29sinstaller::windows::registry::::get_registry_identifierinstaller::windows::registry::get_registry_identifier
41760083114.51s4.51sinstaller::windows::registry::::CORE:substinstaller::windows::registry::CORE:subst (opcode)
139193112.84s52.2sinstaller::windows::registry::::get_registry_valueinstaller::windows::registry::get_registry_value
139193111.31s11.8sinstaller::windows::registry::::get_registry_componentinstaller::windows::registry::get_registry_component
139193111.18s24.3sinstaller::windows::registry::::get_registry_keyinstaller::windows::registry::get_registry_key
139193111.08s1.16sinstaller::windows::registry::::get_registry_nameinstaller::windows::registry::get_registry_name
13919311940ms940msinstaller::windows::registry::::get_registry_rootinstaller::windows::registry::get_registry_root
1253173101687ms687msinstaller::windows::registry::::CORE:matchinstaller::windows::registry::CORE:match (opcode)
1091117.7ms17.7msinstaller::windows::registry::::add_userregs_to_registry_tableinstaller::windows::registry::add_userregs_to_registry_table
111376µs379µsinstaller::windows::registry::::BEGIN@30installer::windows::registry::BEGIN@30
11116µs18µsinstaller::windows::registry::::BEGIN@32installer::windows::registry::BEGIN@32
11114µs15µsinstaller::windows::registry::::BEGIN@33installer::windows::registry::BEGIN@33
11114µs16µsinstaller::windows::registry::::BEGIN@31installer::windows::registry::BEGIN@31
0000s0sinstaller::windows::registry::::generate_new_short_registrycomponentnameinstaller::windows::registry::generate_new_short_registrycomponentname
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::registry;
29
30261µs2382µs
# spent 379µs (376+3) within installer::windows::registry::BEGIN@30 which was called: # once (376µs+3µs) by installer::BEGIN@79 at line 30
use installer::files;
# spent 379µs making 1 call to installer::windows::registry::BEGIN@30 # spent 3µs making 1 call to UNIVERSAL::import
31254µs219µs
# spent 16µs (14+3) within installer::windows::registry::BEGIN@31 which was called: # once (14µs+3µs) by installer::BEGIN@79 at line 31
use installer::globals;
# spent 16µs making 1 call to installer::windows::registry::BEGIN@31 # spent 3µs making 1 call to UNIVERSAL::import
32256µs221µs
# spent 18µs (16+2) within installer::windows::registry::BEGIN@32 which was called: # once (16µs+2µs) by installer::BEGIN@79 at line 32
use installer::worker;
# spent 18µs making 1 call to installer::windows::registry::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
3323.81ms217µs
# spent 15µs (14+1) within installer::windows::registry::BEGIN@33 which was called: # once (14µs+1µs) by installer::BEGIN@79 at line 33
use installer::windows::idtglobal;
# spent 15µs making 1 call to installer::windows::registry::BEGIN@33 # spent 2µs making 1 call to UNIVERSAL::import
34
35#####################################################
36# Generating the component name from a registryitem
37#####################################################
38
39sub get_registry_component_name
40
# spent 10.5s (8.14+2.35) within installer::windows::registry::get_registry_component_name which was called 139193 times, avg 75µs/call: # 139193 times (8.14s+2.35s) by installer::windows::registry::get_registry_component at line 299, avg 75µs/call
{
4113919392.8ms my ($registryref, $allvariables) = @_;
42
43 # In this function exists the rule to create components from registryitems
44 # Rule:
45 # The componentname can be directly taken from the ModuleID.
46 # All registryitems belonging to one module can get the same component.
47
4813919368.2ms my $componentname = "";
4913919358.8ms my $isrootmodule = 0;
50
51139193127ms if ( $registryref->{'ModuleID'} ) { $componentname = $registryref->{'ModuleID'}; }
52
53139193545ms13919399.4ms $componentname =~ s/\\/\_/g;
# spent 99.4ms making 139193 calls to installer::windows::registry::CORE:subst, avg 714ns/call
54139193460ms13919370.7ms $componentname =~ s/\//\_/g;
# spent 70.7ms making 139193 calls to installer::windows::registry::CORE:subst, avg 508ns/call
55139193463ms13919369.6ms $componentname =~ s/\-/\_/g;
# spent 69.6ms making 139193 calls to installer::windows::registry::CORE:subst, avg 500ns/call
56139193766ms139193346ms $componentname =~ s/\_\s*$//g;
# spent 346ms making 139193 calls to installer::windows::registry::CORE:subst, avg 2µs/call
57
5813919399.5ms $componentname = lc($componentname); # componentnames always lowercase
59
6013919367.4ms if ( $componentname eq "gid_module_root" ) { $isrootmodule = 1; }
61
62 # Attention: Maximum length for the componentname is 72
63
64 # identifying this component as registryitem component
65139193240ms $componentname = "registry_" . $componentname;
66
671391931.11s139193645ms $componentname =~ s/gid_module_/g_m_/g;
# spent 645ms making 139193 calls to installer::windows::registry::CORE:subst, avg 5µs/call
68139193549ms139193142ms $componentname =~ s/_optional_/_o_/g;
# spent 142ms making 139193 calls to installer::windows::registry::CORE:subst, avg 1µs/call
69139193482ms13919391.1ms $componentname =~ s/_javafilter_/_jf_/g;
# spent 91.1ms making 139193 calls to installer::windows::registry::CORE:subst, avg 654ns/call
70
71 # This componentname must be more specific
7213919371.9ms my $addon = "_";
73139193144ms if ( $allvariables->{'PRODUCTNAME'} ) { $addon = $addon . $allvariables->{'PRODUCTNAME'}; }
74139193105ms if ( $allvariables->{'PRODUCTVERSION'} ) { $addon = $addon . $allvariables->{'PRODUCTVERSION'}; }
7513919382.9ms $addon = lc($addon);
76139193480ms13919376.0ms $addon =~ s/ //g;
# spent 76.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 546ns/call
77139193460ms13919372.2ms $addon =~ s/-//g;
# spent 72.2ms making 139193 calls to installer::windows::registry::CORE:subst, avg 519ns/call
78139193938ms139193504ms $addon =~ s/\.//g;
# spent 504ms making 139193 calls to installer::windows::registry::CORE:subst, avg 4µs/call
79
8013919372.4ms my $styles = "";
8113919395.6ms if ( $registryref->{'Styles'} ) { $styles = $registryref->{'Styles'}; }
82
83 # Layer links must have unique Component GUID for all products. This is necessary, because only the
84 # uninstallation of the last product has to delete registry keys.
85139193488ms13919367.6ms if ( $styles =~ /\bLAYER_REGISTRY\b/ )
# spent 67.6ms making 139193 calls to installer::windows::registry::CORE:match, avg 486ns/call
86 {
87218252µs $componentname = "g_m_root_registry_layer_ooo_reglayer";
88 # Styles USE_URELAYERVERSION, USE_PRODUCTVERSION
892181.23ms218368µs if ( $styles =~ /\bUSE_URELAYERVERSION\b/ ) { $addon = "_ure_" . $allvariables->{'URELAYERVERSION'}; }
# spent 368µs making 218 calls to installer::windows::registry::CORE:match, avg 2µs/call
902181.15ms218347µs if ( $styles =~ /\bUSE_PRODUCTVERSION\b/ ) { $addon = "_basis_" . $allvariables->{'PRODUCTVERSION'}; }
# spent 347µs making 218 calls to installer::windows::registry::CORE:match, avg 2µs/call
912181.26ms218480µs $addon =~ s/\.//g;
# spent 480µs making 218 calls to installer::windows::registry::CORE:subst, avg 2µs/call
92 }
93
94139193137ms $componentname = $componentname . $addon;
95
96139193856ms278386113ms if (( $styles =~ /\bLANGUAGEPACK\b/ ) && ( $installer::globals::languagepack )) { $componentname = $componentname . "_lang"; }
# spent 113ms making 278386 calls to installer::windows::registry::CORE:match, avg 405ns/call
97 elsif (( $styles =~ /\bHELPPACK\b/ ) && ( $installer::globals::helppack )) { $componentname = $componentname . "_help"; }
98139193453ms13919357.2ms if ( $styles =~ /\bALWAYS_REQUIRED\b/ ) { $componentname = $componentname . "_forced"; }
# spent 57.2ms making 139193 calls to installer::windows::registry::CORE:match, avg 411ns/call
99
100 # Attention: Maximum length for the componentname is 72
101 # %installer::globals::allregistrycomponents_in_this_database_ : resetted for each database
102 # %installer::globals::allregistrycomponents_ : not resetted for each database
103 # Component strings must be unique for the complete product, because they are used for
104 # the creation of the globally unique identifier.
105
10613919375.4ms my $fullname = $componentname; # This can be longer than 72
107
108139193211ms if (( exists($installer::globals::allregistrycomponents_{$fullname}) ) && ( ! exists($installer::globals::allregistrycomponents_in_this_database_{$fullname}) ))
109 {
110 # This is not allowed: One component cannot be installed with different packages.
111 installer::exiter::exit_program("ERROR: Windows registry component \"$fullname\" is already included into another package. This is not allowed.", "get_registry_component_name");
112 }
113
114139193182ms if ( exists($installer::globals::allregistrycomponents_{$fullname}) )
115 {
116 $componentname = $installer::globals::allregistrycomponents_{$fullname};
117 }
118 else
119 {
1204533µs if ( length($componentname) > 60 )
121 {
122 $componentname = generate_new_short_registrycomponentname($componentname); # This has to be unique for the complete product, not only one package
123 }
124
12545112µs $installer::globals::allregistrycomponents_{$fullname} = $componentname;
1264562µs $installer::globals::allregistrycomponents_in_this_database_{$fullname} = 1;
127 }
128
12914736862.4ms if ( $isrootmodule ) { $installer::globals::registryrootcomponent = $componentname; }
130
131139193729ms return $componentname;
132}
133
134#########################################################
135# Create a shorter version of a long component name,
136# because maximum length in msi database is 72.
137# Attention: In multi msi installation sets, the short
138# names have to be unique over all packages, because
139# this string is used to create the globally unique id
140# -> no resetting of
141# %installer::globals::allshortregistrycomponents
142# after a package was created.
143#########################################################
144
145sub generate_new_short_registrycomponentname
146{
147 my ($componentname) = @_;
148
149 my $shortcomponentname = "";
150 my $counter = 1;
151
152 my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters
153 $startversion = $startversion . "_";
154
155 $shortcomponentname = $startversion . $counter;
156
157 while ( exists($installer::globals::allshortregistrycomponents{$shortcomponentname}) )
158 {
159 $counter++;
160 $shortcomponentname = $startversion . $counter;
161 }
162
163 $installer::globals::allshortregistrycomponents{$shortcomponentname} = 1;
164
165 return $shortcomponentname;
166}
167
168##############################################################
169# Returning identifier for registry table.
170##############################################################
171
172sub get_registry_identifier
173
# spent 9.29s (7.53+1.76) within installer::windows::registry::get_registry_identifier which was called 139193 times, avg 67µs/call: # 139193 times (7.53s+1.76s) by installer::windows::registry::create_registry_table at line 370, avg 67µs/call
{
17413919396.8ms my ($registry) = @_;
175
17613919369.3ms my $identifier = "";
177
178139193152ms if ( $registry->{'gid'} ) { $identifier = $registry->{'gid'}; }
179
180139193101ms $identifier = lc($identifier); # always lower case
181
182 # Attention: Maximum length is 72
183
184139193882ms139193368ms $identifier =~ s/gid_regitem_/g_r_/;
# spent 368ms making 139193 calls to installer::windows::registry::CORE:subst, avg 3µs/call
185139193511ms139193100ms $identifier =~ s/_soffice_/_s_/;
# spent 100ms making 139193 calls to installer::windows::registry::CORE:subst, avg 722ns/call
186139193517ms139193110ms $identifier =~ s/_clsid_/_c_/;
# spent 110ms making 139193 calls to installer::windows::registry::CORE:subst, avg 789ns/call
187139193480ms13919380.8ms $identifier =~ s/_currentversion_/_cv_/;
# spent 80.8ms making 139193 calls to installer::windows::registry::CORE:subst, avg 581ns/call
188139193475ms13919380.9ms $identifier =~ s/_microsoft_/_ms_/;
# spent 80.9ms making 139193 calls to installer::windows::registry::CORE:subst, avg 582ns/call
189139193489ms13919391.0ms $identifier =~ s/_manufacturer_/_mf_/;
# spent 91.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 653ns/call
190139193482ms13919388.0ms $identifier =~ s/_productname_/_pn_/;
# spent 88.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 632ns/call
191139193475ms13919385.6ms $identifier =~ s/_productversion_/_pv_/;
# spent 85.6ms making 139193 calls to installer::windows::registry::CORE:subst, avg 615ns/call
192139193471ms13919373.8ms $identifier =~ s/_staroffice_/_so_/;
# spent 73.8ms making 139193 calls to installer::windows::registry::CORE:subst, avg 530ns/call
193139193496ms13919396.3ms $identifier =~ s/_software_/_sw_/;
# spent 96.3ms making 139193 calls to installer::windows::registry::CORE:subst, avg 692ns/call
194139193471ms13919380.0ms $identifier =~ s/_capabilities_/_cap_/;
# spent 80.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 575ns/call
195139193473ms13919370.5ms $identifier =~ s/_classpath_/_cp_/;
# spent 70.5ms making 139193 calls to installer::windows::registry::CORE:subst, avg 507ns/call
196139193459ms13919371.0ms $identifier =~ s/_extension_/_ex_/;
# spent 71.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 510ns/call
197139193471ms13919377.7ms $identifier =~ s/_fileassociations_/_fa_/;
# spent 77.7ms making 139193 calls to installer::windows::registry::CORE:subst, avg 558ns/call
198139193468ms13919370.9ms $identifier =~ s/_propertysheethandlers_/_psh_/;
# spent 70.9ms making 139193 calls to installer::windows::registry::CORE:subst, avg 509ns/call
199139193627ms139193215ms $identifier =~ s/__/_/g;
# spent 215ms making 139193 calls to installer::windows::registry::CORE:subst, avg 2µs/call
200
201 # Saving this in the registry collector
202
203139193131ms $registry->{'uniquename'} = $identifier;
204
205139193740ms return $identifier;
206}
207
208##################################################################
209# Returning root value for registry table.
210##################################################################
211
212sub get_registry_root
213
# spent 940ms within installer::windows::registry::get_registry_root which was called 139193 times, avg 7µs/call: # 139193 times (940ms+0s) by installer::windows::registry::create_registry_table at line 371, avg 7µs/call
{
214139193109ms my ($registry) = @_;
215
21613919362.7ms my $rootvalue = 0; # Default: Parent is KKEY_CLASSES_ROOT
21713919367.1ms my $scproot = "";
218
219139193136ms if ( $registry->{'ParentID'} ) { $scproot = $registry->{'ParentID'}; }
220
22113919372.2ms if ( $scproot eq "PREDEFINED_HKEY_LOCAL_MACHINE" ) { $rootvalue = -1; }
222
22313919378.6ms if ( $scproot eq "PREDEFINED_HKEY_CLASSES_ROOT" ) { $rootvalue = 0; }
224
22513919355.1ms if ( $scproot eq "PREDEFINED_HKEY_CURRENT_USER_ONLY" ) { $rootvalue = 1; }
226
22713919349.7ms if ( $scproot eq "PREDEFINED_HKEY_LOCAL_MACHINE_ONLY" ) { $rootvalue = 2; }
228
229139193581ms return $rootvalue;
230}
231
232##############################################################
233# Returning key for registry table.
234##############################################################
235
236sub get_registry_key
237
# spent 24.3s (1.18+23.2) within installer::windows::registry::get_registry_key which was called 139193 times, avg 175µs/call: # 139193 times (1.18s+23.2s) by installer::windows::registry::create_registry_table at line 372, avg 175µs/call
{
238139193111ms my ($registry, $allvariableshashref) = @_;
239
24013919370.5ms my $key = "";
241
242139193126ms if ( $registry->{'Subkey'} ) { $key = $registry->{'Subkey'}; }
243
244139193601ms14878523.2s if ( $key =~ /\%/ ) { $key = installer::worker::replace_variables_in_string($key, $allvariableshashref); }
# spent 23.0s making 9592 calls to installer::worker::replace_variables_in_string, avg 2.40ms/call # spent 129ms making 139193 calls to installer::windows::registry::CORE:match, avg 927ns/call
245
246139193623ms return $key;
247}
248
249##############################################################
250# Returning name for registry table.
251##############################################################
252
253sub get_registry_name
254
# spent 1.16s (1.08+77.9ms) within installer::windows::registry::get_registry_name which was called 139193 times, avg 8µs/call: # 139193 times (1.08s+77.9ms) by installer::windows::registry::create_registry_table at line 373, avg 8µs/call
{
255139193114ms my ($registry, $allvariableshashref) = @_;
256
25713919366.5ms my $name = "";
258
259139193105ms if ( $registry->{'Name'} ) { $name = $registry->{'Name'}; }
260
261139193506ms13919377.9ms if ( $name =~ /\%/ ) { $name = installer::worker::replace_variables_in_string($name, $allvariableshashref); }
# spent 77.9ms making 139193 calls to installer::windows::registry::CORE:match, avg 560ns/call
262
263139193611ms return $name;
264}
265
266##############################################################
267# Returning value for registry table.
268##############################################################
269
270sub get_registry_value
271
# spent 52.2s (2.84+49.4) within installer::windows::registry::get_registry_value which was called 139193 times, avg 375µs/call: # 139193 times (2.84s+49.4s) by installer::windows::registry::create_registry_table at line 374, avg 375µs/call
{
272139193110ms my ($registry, $allvariableshashref) = @_;
273
27413919363.5ms my $value = "";
275
276139193140ms if ( $registry->{'Value'} ) { $value = $registry->{'Value'}; }
277
278139193698ms139193252ms $value =~ s/\\\"/\"/g; # no more masquerading of '"'
# spent 252ms making 139193 calls to installer::windows::registry::CORE:subst, avg 2µs/call
279139193481ms13919389.1ms $value =~ s/\\\\\s*$/\\/g; # making "\\" at end of value to "\"
# spent 89.1ms making 139193 calls to installer::windows::registry::CORE:subst, avg 640ns/call
280139193577ms139193182ms $value =~ s/\<progpath\>/\[INSTALLLOCATION\]/;
# spent 182ms making 139193 calls to installer::windows::registry::CORE:subst, avg 1µs/call
281139193504ms139193114ms $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]"
# spent 114ms making 139193 calls to installer::windows::registry::CORE:subst, avg 818ns/call
282
283139193575ms15946748.7s if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); }
# spent 48.6s making 20274 calls to installer::worker::replace_variables_in_string, avg 2.40ms/call # spent 111ms making 139193 calls to installer::windows::registry::CORE:match, avg 796ns/call
284
285139193644ms return $value;
286}
287
288##############################################################
289# Returning component for registry table.
290##############################################################
291
292sub get_registry_component
293
# spent 11.8s (1.31+10.5) within installer::windows::registry::get_registry_component which was called 139193 times, avg 85µs/call: # 139193 times (1.31s+10.5s) by installer::windows::registry::create_registry_table at line 375, avg 85µs/call
{
294139193117ms my ($registry, $allvariables) = @_;
295
296 # All registry items belonging to one module can
297 # be included into one component
298
299139193400ms13919310.5s my $componentname = get_registry_component_name($registry, $allvariables);
# spent 10.5s making 139193 calls to installer::windows::registry::get_registry_component_name, avg 75µs/call
300
301 # saving componentname in the registryitem collector
302
303139193167ms $registry->{'componentname'} = $componentname;
304
305139193596ms return $componentname;
306}
307
308######################################################
309# Adding the content of
310# @installer::globals::userregistrycollector
311# to the registry table. The content was collected
312# in create_files_table() in file.pm.
313######################################################
314
315sub add_userregs_to_registry_table
316
# spent 17.7ms within installer::windows::registry::add_userregs_to_registry_table which was called 109 times, avg 162µs/call: # 109 times (17.7ms+0s) by installer::windows::registry::create_registry_table at line 416, avg 162µs/call
{
317109162µs my ( $registrytable, $allvariables ) = @_;
318
3191091.99ms for ( my $i = 0; $i <= $#installer::globals::userregistrycollector; $i++ )
320 {
321872721µs my $onefile = $installer::globals::userregistrycollector[$i];
322
323872476µs my %registry = ();
324
3258721.74ms $registry{'Registry'} = $onefile->{'userregkeypath'};
326872863µs $registry{'Root'} = "1"; # always HKCU
3278721.79ms $registry{'Key'} = "Software\\$allvariables->{'MANUFACTURER'}\\$allvariables->{'PRODUCTNAME'} $allvariables->{'PRODUCTVERSION'}\\";
3288721.33ms if ( $onefile->{'needs_user_registry_key'} ) { $registry{'Key'} = $registry{'Key'} . "StartMenu"; }
3298721.61ms $registry{'Name'} = $onefile->{'Name'};
330872859µs $registry{'Value'} = "1";
3318721.45ms $registry{'Component_'} = $onefile->{'componentname'};
332
3338721.90ms my $oneline = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t"
334 . $registry{'Name'} . "\t" . $registry{'Value'} . "\t" . $registry{'Component_'} . "\n";
335
3368723.10ms push(@{$registrytable}, $oneline);
337 }
338}
339
340######################################################
341# Creating the file Registry.idt dynamically
342# Content:
343# Registry Root Key Name Value Component_
344######################################################
345
346sub create_registry_table
347
# spent 114s (13.6+100) within installer::windows::registry::create_registry_table which was called: # once (13.6s+100s) by installer::run at line 1500 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
34817µs my ($registryref, $allregistrycomponentsref, $basedir, $languagesarrayref, $allvariableshashref) = @_;
349
3501462µs for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
351 {
352109291µs my $onelanguage = ${$languagesarrayref}[$m];
353
354109202µs my @registrytable = ();
355
356109845µs1093.08ms installer::windows::idtglobal::write_idt_header(\@registrytable, "registry");
# spent 3.08ms making 109 calls to installer::windows::idtglobal::write_idt_header, avg 28µs/call
357
3581091.31s for ( my $i = 0; $i <= $#{$registryref}; $i++ )
359 {
36019403091.12s my $oneregistry = ${$registryref}[$i];
361
362 # Controlling the language!
363 # Only language independent folderitems or folderitems with the correct language
364 # will be included into the table
365
36637414253.07s if (! (!(( $oneregistry->{'ismultilingual'} )) || ( $oneregistry->{'specificlanguage'} eq $onelanguage )) ) { next; }
367
36813919391.0ms my %registry = ();
369
370139193454ms1391939.29s $registry{'Registry'} = get_registry_identifier($oneregistry);
# spent 9.29s making 139193 calls to installer::windows::registry::get_registry_identifier, avg 67µs/call
371139193388ms139193940ms $registry{'Root'} = get_registry_root($oneregistry);
# spent 940ms making 139193 calls to installer::windows::registry::get_registry_root, avg 7µs/call
372139193403ms13919324.3s $registry{'Key'} = get_registry_key($oneregistry, $allvariableshashref);
# spent 24.3s making 139193 calls to installer::windows::registry::get_registry_key, avg 175µs/call
373139193429ms1391931.16s $registry{'Name'} = get_registry_name($oneregistry, $allvariableshashref);
# spent 1.16s making 139193 calls to installer::windows::registry::get_registry_name, avg 8µs/call
374139193429ms13919352.2s $registry{'Value'} = get_registry_value($oneregistry, $allvariableshashref);
# spent 52.2s making 139193 calls to installer::windows::registry::get_registry_value, avg 375µs/call
375139193429ms13919311.8s $registry{'Component_'} = get_registry_component($oneregistry, $allvariableshashref);
# spent 11.8s making 139193 calls to installer::windows::registry::get_registry_component, avg 85µs/call
376
377 # Collecting all components
3781391931.40s if (! grep {$_ eq $registry{'Component_'}} @{$allregistrycomponentsref})
379 {
380 push(@{$allregistrycomponentsref}, $registry{'Component_'});
381 }
382
383 # Collecting all components with DONT_DELETE style
38413919370.2ms my $style = "";
38513919379.4ms if ( $oneregistry->{'Styles'} ) { $style = $oneregistry->{'Styles'}; }
386139193538ms13919375.0ms if ( $style =~ /\bDONT_DELETE\b/ ) { $installer::globals::dontdeletecomponents{$registry{'Component_'}} = 1; }
# spent 75.0ms making 139193 calls to installer::windows::registry::CORE:match, avg 539ns/call
387
388 # Collecting all registry components with ALWAYS_REQUIRED style
389139193752ms13919356.0ms if ( ! ( $style =~ /\bALWAYS_REQUIRED\b/ ))
# spent 56.0ms making 139193 calls to installer::windows::registry::CORE:match, avg 403ns/call
390 {
391 # Setting a component condition for unforced registry components!
392 # Only write into registry, if WRITE_REGISTRY is set.
393 if ( $oneregistry->{'ComponentCondition'} ) { $oneregistry->{'ComponentCondition'} = "(" . $oneregistry->{'ComponentCondition'} . ") AND (WRITE_REGISTRY=1)"; }
3941761725.5ms else { $oneregistry->{'ComponentCondition'} = "WRITE_REGISTRY=1"; }
395 }
396
397 # Collecting all component conditions
398139193168ms if ( $oneregistry->{'ComponentCondition'} )
399 {
400 if ( ! exists($installer::globals::componentcondition{$registry{'Component_'}}))
401 {
402 $installer::globals::componentcondition{$registry{'Component_'}} = $oneregistry->{'ComponentCondition'};
403 }
404 }
405
406139193436ms my $oneline = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t"
407 . $registry{'Name'} . "\t" . $registry{'Value'} . "\t" . $registry{'Component_'} . "\n";
408
409139193606ms push(@registrytable, $oneline);
410 }
411
412 # If there are added user registry keys for files collected in
413 # @installer::globals::userregistrycollector (file.pm), then
414 # this registry keys have to be added now.
415
416109591µs10917.7ms if ( $installer::globals::addeduserregitrykeys ) { add_userregs_to_registry_table(\@registrytable, $allvariableshashref); }
# spent 17.7ms making 109 calls to installer::windows::registry::add_userregs_to_registry_table, avg 162µs/call
417
418 # Saving the file
419
420109324µs my $registrytablename = $basedir . $installer::globals::separator . "Registry.idt" . "." . $onelanguage;
421109642µs109234ms installer::files::save_file($registrytablename ,\@registrytable);
# spent 234ms making 109 calls to installer::files::save_file, avg 2.15ms/call
422109383µs my $infoline = "Created idt file: $registrytablename\n";
42310951.7ms push(@installer::globals::logfileinfo, $infoline);
424 }
425}
426
42717µs1;
 
# spent 687ms within installer::windows::registry::CORE:match which was called 1253173 times, avg 548ns/call: # 278386 times (113ms+0s) by installer::windows::registry::get_registry_component_name at line 96, avg 405ns/call # 139193 times (129ms+0s) by installer::windows::registry::get_registry_key at line 244, avg 927ns/call # 139193 times (111ms+0s) by installer::windows::registry::get_registry_value at line 283, avg 796ns/call # 139193 times (77.9ms+0s) by installer::windows::registry::get_registry_name at line 261, avg 560ns/call # 139193 times (75.0ms+0s) by installer::windows::registry::create_registry_table at line 386, avg 539ns/call # 139193 times (67.6ms+0s) by installer::windows::registry::get_registry_component_name at line 85, avg 486ns/call # 139193 times (57.2ms+0s) by installer::windows::registry::get_registry_component_name at line 98, avg 411ns/call # 139193 times (56.0ms+0s) by installer::windows::registry::create_registry_table at line 389, avg 403ns/call # 218 times (368µs+0s) by installer::windows::registry::get_registry_component_name at line 89, avg 2µs/call # 218 times (347µs+0s) by installer::windows::registry::get_registry_component_name at line 90, avg 2µs/call
sub installer::windows::registry::CORE:match; # opcode
# spent 4.51s within installer::windows::registry::CORE:subst which was called 4176008 times, avg 1µs/call: # 139193 times (645ms+0s) by installer::windows::registry::get_registry_component_name at line 67, avg 5µs/call # 139193 times (504ms+0s) by installer::windows::registry::get_registry_component_name at line 78, avg 4µs/call # 139193 times (368ms+0s) by installer::windows::registry::get_registry_identifier at line 184, avg 3µs/call # 139193 times (346ms+0s) by installer::windows::registry::get_registry_component_name at line 56, avg 2µs/call # 139193 times (252ms+0s) by installer::windows::registry::get_registry_value at line 278, avg 2µs/call # 139193 times (215ms+0s) by installer::windows::registry::get_registry_identifier at line 199, avg 2µs/call # 139193 times (182ms+0s) by installer::windows::registry::get_registry_value at line 280, avg 1µs/call # 139193 times (142ms+0s) by installer::windows::registry::get_registry_component_name at line 68, avg 1µs/call # 139193 times (114ms+0s) by installer::windows::registry::get_registry_value at line 281, avg 818ns/call # 139193 times (110ms+0s) by installer::windows::registry::get_registry_identifier at line 186, avg 789ns/call # 139193 times (100ms+0s) by installer::windows::registry::get_registry_identifier at line 185, avg 722ns/call # 139193 times (99.4ms+0s) by installer::windows::registry::get_registry_component_name at line 53, avg 714ns/call # 139193 times (96.3ms+0s) by installer::windows::registry::get_registry_identifier at line 193, avg 692ns/call # 139193 times (91.1ms+0s) by installer::windows::registry::get_registry_component_name at line 69, avg 654ns/call # 139193 times (91.0ms+0s) by installer::windows::registry::get_registry_identifier at line 189, avg 653ns/call # 139193 times (89.1ms+0s) by installer::windows::registry::get_registry_value at line 279, avg 640ns/call # 139193 times (88.0ms+0s) by installer::windows::registry::get_registry_identifier at line 190, avg 632ns/call # 139193 times (85.6ms+0s) by installer::windows::registry::get_registry_identifier at line 191, avg 615ns/call # 139193 times (80.9ms+0s) by installer::windows::registry::get_registry_identifier at line 188, avg 582ns/call # 139193 times (80.8ms+0s) by installer::windows::registry::get_registry_identifier at line 187, avg 581ns/call # 139193 times (80.0ms+0s) by installer::windows::registry::get_registry_identifier at line 194, avg 575ns/call # 139193 times (77.7ms+0s) by installer::windows::registry::get_registry_identifier at line 197, avg 558ns/call # 139193 times (76.0ms+0s) by installer::windows::registry::get_registry_component_name at line 76, avg 546ns/call # 139193 times (73.8ms+0s) by installer::windows::registry::get_registry_identifier at line 192, avg 530ns/call # 139193 times (72.2ms+0s) by installer::windows::registry::get_registry_component_name at line 77, avg 519ns/call # 139193 times (71.0ms+0s) by installer::windows::registry::get_registry_identifier at line 196, avg 510ns/call # 139193 times (70.9ms+0s) by installer::windows::registry::get_registry_identifier at line 198, avg 509ns/call # 139193 times (70.7ms+0s) by installer::windows::registry::get_registry_component_name at line 54, avg 508ns/call # 139193 times (70.5ms+0s) by installer::windows::registry::get_registry_identifier at line 195, avg 507ns/call # 139193 times (69.6ms+0s) by installer::windows::registry::get_registry_component_name at line 55, avg 500ns/call # 218 times (480µs+0s) by installer::windows::registry::get_registry_component_name at line 91, avg 2µs/call
sub installer::windows::registry::CORE:subst; # opcode