This is a static copy of a profile report

Home

hggetbehavior>localGet (5 calls, 0.040 sec)
Generated 28-Feb-2011 19:17:58 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-function5
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
90
b = hgbehaviorfactory(bn);
50.030 s75.0%
87
bn = behavior_name{n};
50.010 s25.0%
103
end
50 s0%
99
end
50 s0%
98
ret_h(end+1) = b;
50 s0%
All other lines  0 s0%
Totals  0.040 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
hgbehaviorfactoryM-function50.030 s75.0%
graphics.ploteditbehavior.dosupportM-function10 s0%
graphics.datacursorbehavior.dosupportM-function10 s0%
graphics.rotate3dbehavior.dosupportM-function10 s0%
graphics.zoombehavior.dosupportM-function10 s0%
graphics.panbehavior.dosupportM-function10 s0%
hggetbehavior>localPeekM-subfunction50 s0%
Self time (built-ins, overhead, etc.)  0.010 s25.0%
Totals  0.040 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
5 79 bb = get(h,'Behavior');
5 80 ret_h = handle([]);
81
5 82 if ischar(behavior_name)
5 83 behavior_name = {behavior_name};
5 84 end
85
5 86 for n = 1:length(behavior_name)
< 0.01 5 87 bn = behavior_name{n};
5 88 b = localPeek(h,bn);
5 89 if isempty(b)
0.03 5 90 b = hgbehaviorfactory(bn);
5 91 if ~isempty(b)
5 92 if ~dosupport(b,h)
93 error('MATLAB:GRAPHICS:HGGETBEHAVIOR',...
94 'Behavior object does not support this handle type.')
95 end
5 96 bb(1).(behavior_name{n}) = b;
5 97 set(h,'Behavior',bb);
5 98 ret_h(end+1) = b;
5 99 end
100 else
101 ret_h(end+1) = b;
102 end
5 103 end

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