This is a static copy of a profile report

Home

graphics/private/fireprintbehavior (80 calls, 6.962 sec)
Generated 05-Aug-2011 13:03:07 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/fireprintbehavior.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/preparehgfunction40
graphics/private/restorehgfunction40
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
behavior = hggetbehavior(allob...
216056.372 s91.5%
15
if ~isempty(behavior) &&am...
216050.262 s3.8%
13
if ishandle(allobj(k)) % callb...
216050.164 s2.4%
11
allobj = findall(h);
800.087 s1.3%
30
end
216050.044 s0.6%
All other lines  0.033 s0.5%
Totals  6.962 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
hggetbehaviorfunction216056.219 s89.3%
findallfunction800.087 s1.3%
graphics/private/useOriginalHGPrintingfunction800 s0%
Self time (built-ins, overhead, etc.)  0.656 s9.4%
Totals  6.962 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function30
Non-code lines (comments, blank lines)7
Code lines (lines that can run)23
Code lines that did run8
Code lines that did not run15
Coverage (did run/can run)34.78 %
Function listing
   time   calls  line
1 function fireprintbehavior(h,callbackName)
2 %FIREPRINTBEHAVIOR Fire callback for Print behavior customization
3 % Helper function for printing. Do not call directly.
4
5 % Copyright 1984-2008 The MathWorks, Inc.
6
80 7 if (~useOriginalHGPrinting())
8 error('MATLAB:Print:ObsoleteFunction', 'The function %s should only be called when original HG printing is enabled.', upper(mfilename));
9 end
10
0.09 80 11 allobj = findall(h);
80 12 for k=1:length(allobj)
0.16 21605 13 if ishandle(allobj(k)) % callbacks might delete other handles
6.37 21605 14 behavior = hggetbehavior(allobj(k),'Print','-peek');
0.26 21605 15 if ~isempty(behavior) && ~isempty(get(behavior,callbackName))
16 cb = get(behavior,callbackName);
17 if isa(cb,'function_handle')
18 cb(handle(allobj(k)),callbackName);
19 elseif iscell(cb)
20 if length(cb) > 1
21 feval(cb{1},handle(allobj(k)),callbackName,cb{2:end});
22 else
23 feval(cb{1},handle(allobj(k)),callbackName);
24 end
25 else
26 feval(cb,handle(allobj(k)),callbackName);
27 end
28 end
0.03 21605 29 end
0.04 21605 30 end