This is a static copy of a profile report

Home

hggetbehavior>localGet (10 calls, 0.052 sec)
Generated 18-Mar-2011 23:32:56 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/graphics/hggetbehavior.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
hggetbehaviorM-function10
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
90
b = hgbehaviorfactory(bn);
100.041 s80.0%
97
set(h,'Behavior',bb);
100.010 s20.0%
103
end
100 s0%
99
end
100 s0%
98
ret_h(end+1) = b;
100 s0%
All other lines  0 s0%
Totals  0.052 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
hgbehaviorfactoryM-function100.041 s80.0%
graphics.ploteditbehavior.dosupportM-function20 s0%
graphics.datacursorbehavior.dosupportM-function20 s0%
graphics.rotate3dbehavior.dosupportM-function20 s0%
graphics.zoombehavior.dosupportM-function20 s0%
graphics.panbehavior.dosupportM-function20 s0%
hggetbehavior>localPeekM-subfunction100 s0%
Self time (built-ins, overhead, etc.)  0.010 s20.0%
Totals  0.052 s100% 
M-Lint results
Line numberMessage
98The variable 'ret_h' appears to change size on every loop iteration. Consider preallocating for speed.
101The variable 'ret_h' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function28
Non-code lines (comments, blank lines)6
Code lines (lines that can run)22
Code lines that did run17
Code lines that did not run5
Coverage (did run/can run)77.27 %
Function listing
   time   calls  line
76 function [ret_h] = localGet(h,behavior_name)
77 % ToDo: Optimize to avoid excessive looping
78
10 79 bb = get(h,'Behavior');
10 80 ret_h = handle([]);
81
10 82 if ischar(behavior_name)
10 83 behavior_name = {behavior_name};
10 84 end
85
10 86 for n = 1:length(behavior_name)
10 87 bn = behavior_name{n};
10 88 b = localPeek(h,bn);
10 89 if isempty(b)
0.04 10 90 b = hgbehaviorfactory(bn);
10 91 if ~isempty(b)
10 92 if ~dosupport(b,h)
93 error('MATLAB:GRAPHICS:HGGETBEHAVIOR',...
94 'Behavior object does not support this handle type.')
95 end
10 96 bb(1).(behavior_name{n}) = b;
0.01 10 97 set(h,'Behavior',bb);
10 98 ret_h(end+1) = b;
10 99 end
100 else
101 ret_h(end+1) = b;
102 end
10 103 end

Other subfunctions in this file are not included in this listing.