← Index
NYTProf Performance Profile   « line view »
For webmerge/scripts/webmerge.pl
  Run on Mon Oct 7 02:42:42 2013
Reported on Mon Oct 7 03:03:25 2013

Filename/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Optimize/JPG.pm
StatementsExecuted 21 statements in 2.19ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11190µs390µsRTP::Webmerge::Optimize::JPG::::BEGIN@8RTP::Webmerge::Optimize::JPG::BEGIN@8
11156µs56µsRTP::Webmerge::Optimize::JPG::::BEGIN@16RTP::Webmerge::Optimize::JPG::BEGIN@16
11153µs84µsRTP::Webmerge::Optimize::JPG::::BEGIN@10RTP::Webmerge::Optimize::JPG::BEGIN@10
11152µs719µsRTP::Webmerge::Optimize::JPG::::BEGIN@30RTP::Webmerge::Optimize::JPG::BEGIN@30
11151µs140µsRTP::Webmerge::Optimize::JPG::::BEGIN@9RTP::Webmerge::Optimize::JPG::BEGIN@9
11124µs24µsRTP::Webmerge::Optimize::JPG::::__ANON__[:48]RTP::Webmerge::Optimize::JPG::__ANON__[:48]
11122µs22µsRTP::Webmerge::Optimize::JPG::::__ANON__[:71]RTP::Webmerge::Optimize::JPG::__ANON__[:71]
11121µs21µsRTP::Webmerge::Optimize::JPG::::BEGIN@25RTP::Webmerge::Optimize::JPG::BEGIN@25
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1###################################################################################################
2# Copyright 2013 by Marcel Greter
3# This file is part of Webmerge (GPL3)
4###################################################################################################
5package RTP::Webmerge::Optimize::JPG;
6###################################################################################################
7
82166µs2689µs
# spent 390µs (90+299) within RTP::Webmerge::Optimize::JPG::BEGIN@8 which was called: # once (90µs+299µs) by main::BEGIN@48 at line 8
use Carp;
# spent 390µs making 1 call to RTP::Webmerge::Optimize::JPG::BEGIN@8 # spent 299µs making 1 call to Exporter::import
92141µs2228µs
# spent 140µs (51+89) within RTP::Webmerge::Optimize::JPG::BEGIN@9 which was called: # once (51µs+89µs) by main::BEGIN@48 at line 9
use strict;
# spent 140µs making 1 call to RTP::Webmerge::Optimize::JPG::BEGIN@9 # spent 89µs making 1 call to strict::import
102332µs2115µs
# spent 84µs (53+31) within RTP::Webmerge::Optimize::JPG::BEGIN@10 which was called: # once (53µs+31µs) by main::BEGIN@48 at line 10
use warnings;
# spent 84µs making 1 call to RTP::Webmerge::Optimize::JPG::BEGIN@10 # spent 31µs making 1 call to warnings::import
11
12###################################################################################################
13
14# setup some global settings
15BEGIN
16
# spent 56µs within RTP::Webmerge::Optimize::JPG::BEGIN@16 which was called: # once (56µs+0s) by main::BEGIN@48 at line 20
{
17 # enable (or disable) different optimizer executables
18121µs $ENV{'WEBMERGE_JPEGTRAN'} = 1 unless exists $ENV{'WEBMERGE_JPEGTRAN'};
19138µs $ENV{'WEBMERGE_JPEGOPTIM'} = 1 unless exists $ENV{'WEBMERGE_JPEGOPTIM'};
201145µs156µs}
# spent 56µs making 1 call to RTP::Webmerge::Optimize::JPG::BEGIN@16
21
22###################################################################################################
23
24# define our version string
251147µs121µs
# spent 21µs within RTP::Webmerge::Optimize::JPG::BEGIN@25 which was called: # once (21µs+0s) by main::BEGIN@48 at line 25
BEGIN { $RTP::Webmerge::Optimize::JPG::VERSION = "0.70" }
# spent 21µs making 1 call to RTP::Webmerge::Optimize::JPG::BEGIN@25
26
27###################################################################################################
28
29# load webmberge module variables to hook into
3021.06ms21.39ms
# spent 719µs (52+667) within RTP::Webmerge::Optimize::JPG::BEGIN@30 which was called: # once (52µs+667µs) by main::BEGIN@48 at line 30
use RTP::Webmerge qw(@initers @checkers %executables range);
# spent 719µs making 1 call to RTP::Webmerge::Optimize::JPG::BEGIN@30 # spent 667µs making 1 call to Exporter::import
31
32###################################################################################################
33
34# push to initers
35# return for getOpts
36push @initers, sub
37
# spent 24µs within RTP::Webmerge::Optimize::JPG::__ANON__[/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Optimize/JPG.pm:48] which was called: # once (24µs+0s) by RTP::Webmerge::initConfig at line 263 of webmerge/scripts/modules/RTP/Webmerge.pm
{
38
39 # get config
4015µs my ($config) = @_;
41
42 # create config variable to be available
4314µs $config->{'optimize-jpg'} = undef;
44
45 # connect each tmpl variable with the getOpt option
46128µs return ('optimize-jpg|jpg!', \ $config->{'cmd_optimize-jpg'});
47
48115µs};
49# EO push initer
50
51###################################################################################################
52
53# push to checkers
54push @checkers, sub
55
# spent 22µs within RTP::Webmerge::Optimize::JPG::__ANON__[/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Optimize/JPG.pm:71] which was called: # once (22µs+0s) by RTP::Webmerge::checkConfig at line 290 of webmerge/scripts/modules/RTP/Webmerge.pm
{
56
57 # get config
5813µs my ($config) = @_;
59
60 # disable if not optimizing
6117µs unless ($config->{'optimize'})
62 { $config->{'optimize-jpg'} = 0; }
63
64 # do nothing if feature is disabled
65124µs return unless $config->{'optimize-jpg'};
66
67 # define executables to optimize jpgs
68 $executables{'jpegoptim'} = ['jpgopt', "--quiet \"%s\""] if $ENV{'WEBMERGE_JPEGOPTIM'};
69 $executables{'jpegtran'} = ['jpgopt', '-copy none -optimize -outfile "%s" "%s"'] if $ENV{'WEBMERGE_JPEGTRAN'};
70
71111µs};
72# EO push checker
73
74###################################################################################################
75
76# now create a new file optimizer subroutine and hook it into our optimizers
77119µs135µs$RTP::Webmerge::Optimize::optimizer{'jpg'} = RTP::Webmerge::Optimize::optimize('jpg');
# spent 35µs making 1 call to RTP::Webmerge::Optimize::optimize
78
79###################################################################################################
80###################################################################################################
81121µs1;