This is a static copy of a profile report

Home

graphics.linkprop.linkprop>localUpdate (3 calls, 0.044 sec)
Generated 05-Aug-2011 13:02:40 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/@graphics/@linkprop/linkprop.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...vd)(localUpdate(obj,evd,hLink,hlist))anonymous function3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
188
set(hlist(ind),propname,propva...
30.044 s100.0%
193
end
90 s0%
192
localSetEnableState(hListeners...
90 s0%
191
for i=1:numel(hListeners)
30 s0%
187
ind = find(isprop(hlist,propna...
30 s0%
All other lines  0 s0%
Totals  0.044 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
ispropfunction30 s0%
...linkprop.linkprop>localSetEnableStatesubfunction180 s0%
Self time (built-ins, overhead, etc.)  0.044 s100.0%
Totals  0.044 s100% 
Code Analyzer results
Line numberMessage
188To improve performance, use logical indexing instead of FIND.
Coverage results
[ Show coverage for parent directory ]
Total lines in function36
Non-code lines (comments, blank lines)13
Code lines (lines that can run)23
Code lines that did run16
Code lines that did not run7
Coverage (did run/can run)69.57 %
Function listing
   time   calls  line
158 function localUpdate(hProp,hEvent,hLink,hlist)
159
160 % Return early if invalid property object
3 161 if ~isa(hProp,'schema.prop') && ~isa(hProp,'meta.property')
162 return;
163 end
164
165 % Return early if invalid handle
3 166 if all(isobject(hlist))
167 if ~all(isvalid(hlist))
168 return;
169 end
3 170 else
3 171 if ~all(ishandle(hlist))
172 return;
173 end
3 174 end
175
3 176 propname = hProp.Name;
3 177 propval = hEvent.AffectedObject.(propname);
178
179 % Temporarily turn off listeners to avoid excessive
180 % listener firing
3 181 hListeners = get(hLink,'Listeners');
3 182 for i=1:numel(hListeners)
9 183 localSetEnableState(hListeners(i),'off');
9 184 end
185
186 % Update all linked objects that have this property
3 187 ind = find(isprop(hlist,propname)==true);
0.04 3 188 set(hlist(ind),propname,propval);
189
190 % Restore listeners
3 191 for i=1:numel(hListeners)
9 192 localSetEnableState(hListeners(i),'on');
9 193 end

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