← 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/createfolder.pm
StatementsExecuted 9510 statements in 163ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1411148ms148msinstaller::windows::createfolder::::get_createfolder_componentinstaller::windows::createfolder::get_createfolder_component
11112.8ms163msinstaller::windows::createfolder::::create_createfolder_tableinstaller::windows::createfolder::create_createfolder_table
184811934µs934µsinstaller::windows::createfolder::::CORE:matchinstaller::windows::createfolder::CORE:match (opcode)
111361µs364µsinstaller::windows::createfolder::::BEGIN@30installer::windows::createfolder::BEGIN@30
1411145µs145µsinstaller::windows::createfolder::::get_createfolder_directoryinstaller::windows::createfolder::get_createfolder_directory
11115µs17µsinstaller::windows::createfolder::::BEGIN@32installer::windows::createfolder::BEGIN@32
11114µs17µsinstaller::windows::createfolder::::BEGIN@31installer::windows::createfolder::BEGIN@31
11114µs16µsinstaller::windows::createfolder::::BEGIN@33installer::windows::createfolder::BEGIN@33
0000s0sinstaller::windows::createfolder::::get_languagepack_fileinstaller::windows::createfolder::get_languagepack_file
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::createfolder;
29
30267µs2368µs
# spent 364µs (361+4) within installer::windows::createfolder::BEGIN@30 which was called: # once (361µs+4µs) by installer::BEGIN@64 at line 30
use installer::exiter;
# spent 364µs making 1 call to installer::windows::createfolder::BEGIN@30 # spent 4µs making 1 call to UNIVERSAL::import
31256µs220µs
# spent 17µs (14+3) within installer::windows::createfolder::BEGIN@31 which was called: # once (14µs+3µs) by installer::BEGIN@64 at line 31
use installer::files;
# spent 17µs making 1 call to installer::windows::createfolder::BEGIN@31 # spent 3µs making 1 call to UNIVERSAL::import
32253µs219µs
# spent 17µs (15+2) within installer::windows::createfolder::BEGIN@32 which was called: # once (15µs+2µs) by installer::BEGIN@64 at line 32
use installer::globals;
# spent 17µs making 1 call to installer::windows::createfolder::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
3321.14ms219µs
# spent 16µs (14+3) within installer::windows::createfolder::BEGIN@33 which was called: # once (14µs+3µs) by installer::BEGIN@64 at line 33
use installer::windows::idtglobal;
# spent 16µs making 1 call to installer::windows::createfolder::BEGIN@33 # spent 3µs making 1 call to UNIVERSAL::import
34
35##############################################################
36# Returning directory for createfolder table.
37##############################################################
38
39sub get_createfolder_directory
40
# spent 145µs within installer::windows::createfolder::get_createfolder_directory which was called 14 times, avg 10µs/call: # 14 times (145µs+0s) by installer::windows::createfolder::create_createfolder_table at line 139, avg 10µs/call
{
411426µs my ($onedir) = @_;
42
431425µs my $uniquename = $onedir->{'uniquename'};
44
4514100µs return $uniquename;
46}
47
48##############################################################
49# Searching the correct file for language pack directories.
50##############################################################
51
52sub get_languagepack_file
53{
54 my ($filesref, $onedir) = @_;
55
56 my $language = $onedir->{'specificlanguage'};
57 my $foundfile = 0;
58 my $onefile = "";
59
60 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
61 {
62 $onefile = ${$filesref}[$i];
63
64 if ( $onefile->{'specificlanguage'} eq $onedir->{'specificlanguage'} )
65 {
66 $foundfile = 1;
67 last;
68 }
69 }
70
71 if ( ! $foundfile ) { installer::exiter::exit_program("ERROR: No file with correct language found (language pack build)!", "get_languagepack_file"); }
72
73 return $onefile;
74}
75
76##############################################################
77# Returning component for createfolder table.
78##############################################################
79
80sub get_createfolder_component
81
# spent 148ms within installer::windows::createfolder::get_createfolder_component which was called 14 times, avg 10.6ms/call: # 14 times (148ms+0s) by installer::windows::createfolder::create_createfolder_table at line 140, avg 10.6ms/call
{
821426µs my ($onedir, $filesref, $allvariableshashref) = @_;
83
84 # Directories do not belong to a module.
85 # Therefore they can only belong to the root module and
86 # will be added to a component at the root module.
87 # All directories will be added to the component
88 # containing the file $allvariableshashref->{'GLOBALFILEGID'}
89
901430µs if ( ! $allvariableshashref->{'GLOBALFILEGID'} ) { installer::exiter::exit_program("ERROR: GLOBALFILEGID must be defined in list file!", "get_createfolder_component"); }
911410µs if (( $installer::globals::patch ) && ( ! $allvariableshashref->{'GLOBALFILEGID'} )) { installer::exiter::exit_program("ERROR: GLOBALPATCHFILEGID must be defined in list file!", "get_createfolder_component"); }
92
931415µs my $globalfilegid = $allvariableshashref->{'GLOBALFILEGID'};
94146µs if ( $installer::globals::patch ) { $globalfilegid = $allvariableshashref->{'GLOBALPATCHFILEGID'}; }
95
96147µs my $onefile;
971430µs if ( $installer::globals::languagepack ) { $onefile = get_languagepack_file($filesref, $onedir); }
98 elsif ( $installer::globals::helppack ) { ($onefile) = grep {$_->{gid} eq 'gid_File_Help_Common_Zip'} @{$filesref} }
9914148ms else { ($onefile) = grep {$_->{gid} eq $globalfilegid} @{$filesref} }
100
1011416µs if (! defined $onefile) {
102 installer::exiter::exit_program("ERROR: Could not find file!", "get_createfolder_component");
103 }
104
10514326µs return $onefile->{'componentname'};
106}
107
108####################################################################################
109# Creating the file CreateFo.idt dynamically for creation of empty directories
110# Content:
111# Directory_ Component_
112####################################################################################
113
114sub create_createfolder_table
115
# spent 163ms (12.8+150) within installer::windows::createfolder::create_createfolder_table which was called: # once (12.8ms+150ms) by installer::run at line 1525 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
11613µs my ($dirref, $filesref, $basedir, $allvariableshashref) = @_;
117
11811µs my @createfoldertable = ();
119
12010s my $infoline;
121
12214µs118µs installer::windows::idtglobal::write_idt_header(\@createfoldertable, "createfolder");
# spent 18µs making 1 call to installer::windows::idtglobal::write_idt_header
123
12412.19ms for ( my $i = 0; $i <= $#{$dirref}; $i++ )
125 {
12618481.36ms my $onedir = ${$dirref}[$i];
127
128 # language packs and help packs get only language dependent directories
1291848701µs if (( $installer::globals::languagepack ) || ( $installer::globals::languagepack ) && ( $onedir->{'specificlanguage'} eq "" )) { next };
130
1311848803µs my $styles = "";
132
13318481.35ms if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
134
13518486.71ms1848934µs if ( $styles =~ /\bCREATE\b/ )
# spent 934µs making 1848 calls to installer::windows::createfolder::CORE:match, avg 505ns/call
136 {
1371424µs my %directory = ();
138
13914111µs14145µs $directory{'Directory_'} = get_createfolder_directory($onedir);
# spent 145µs making 14 calls to installer::windows::createfolder::get_createfolder_directory, avg 10µs/call
1401487µs14148ms $directory{'Component_'} = get_createfolder_component($onedir, $filesref, $allvariableshashref);
# spent 148ms making 14 calls to installer::windows::createfolder::get_createfolder_component, avg 10.6ms/call
141
1421464µs my $oneline = $directory{'Directory_'} . "\t" . $directory{'Component_'} . "\n";
143
1441486µs push(@createfoldertable, $oneline);
145 }
146 }
147
148 # Saving the file
149
15017µs my $createfoldertablename = $basedir . $installer::globals::separator . "CreateFo.idt";
15118µs11.17ms installer::files::save_file($createfoldertablename ,\@createfoldertable);
# spent 1.17ms making 1 call to installer::files::save_file
15214µs $infoline = "Created idt file: $createfoldertablename\n";
153120µs push(@installer::globals::logfileinfo, $infoline);
154
155}
156
15717µs1;
 
# spent 934µs within installer::windows::createfolder::CORE:match which was called 1848 times, avg 505ns/call: # 1848 times (934µs+0s) by installer::windows::createfolder::create_createfolder_table at line 135, avg 505ns/call
sub installer::windows::createfolder::CORE:match; # opcode