This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
14 | behavior = hggetbehavior(allob... | 21605 | 6.372 s | 91.5% |  |
15 | if ~isempty(behavior) &&am... | 21605 | 0.262 s | 3.8% |  |
13 | if ishandle(allobj(k)) % callb... | 21605 | 0.164 s | 2.4% |  |
11 | allobj = findall(h); | 80 | 0.087 s | 1.3% |  |
30 | end | 21605 | 0.044 s | 0.6% |  |
All other lines | | | 0.033 s | 0.5% |  |
Totals | | | 6.962 s | 100% | |
Children (called functions)
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 30 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 23 |
Code lines that did run | 8 |
Code lines that did not run | 15 |
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