This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
188 | set(hlist(ind),propname,propva... | 3 | 0.044 s | 100.0% |  |
193 | end | 9 | 0 s | 0% |  |
192 | localSetEnableState(hListeners... | 9 | 0 s | 0% |  |
191 | for i=1:numel(hListeners) | 3 | 0 s | 0% |  |
187 | ind = find(isprop(hlist,propna... | 3 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.044 s | 100% | |
Children (called functions)
Code Analyzer results
Line number | Message |
188 | To improve performance, use logical indexing instead of FIND. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 36 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 23 |
Code lines that did run | 16 |
Code lines that did not run | 7 |
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.