This is a static copy of a profile report

Home

hgbehaviorfactory>localCreate (Calls: 6, Time: 0.030 s)
Generated 18-May-2021 16:05:25 using performance time.
subfunction in file /usr/local/MATLAB/R2021a/toolbox/matlab/graphics/hgbehaviorfactory.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
hgbehaviorfactoryfunction6
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
52
bh = feval(info.constructor);
60.018 s61.0%
43
dat = localGetBehaviorInfo(hOb...
60.008 s27.2%
59
end
720.001 s2.6%
49
s = strcmpi(behavior_name,info...
720.001 s2.4%
48
info = dat{n};
720.001 s2.0%
All other lines  0.001 s4.8%
Totals  0.030 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
hgbehaviorfactory>localGetBehaviorInfosubfunction60.008 s25.8%
...DataCursorBehavior.DataCursorBehaviorclass method60.002 s6.1%
Self time (built-ins, overhead, etc.)  0.020 s68.1%
Totals  0.030 s100% 
Code Analyzer results
Line numberMessage
56The 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 function20
Non-code lines (comments, blank lines)5
Code lines (lines that can run)15
Code lines that did run13
Code lines that did not run2
Coverage (did run/can run)86.67 %
Function listing
time 
Calls 
 line
  40 
function [ret_h] = localCreate(behavior_name, hObj)
  41 

< 0.001 
      6 
  42
ret_h = []; 
  0.008 
      6 
  43
dat = localGetBehaviorInfo(hObj); 
  44 
% Note that ret_h cannot be used to accumulate both MCOS and UDD behavior
  45 
% objects. This should not happen currently since hgbehaviorfacotry is not
  46 
% called with a cell array of behavior_name. 
< 0.001 
      6 
  47
for n = 1:length(dat) 
< 0.001 
     72 
  48
     info = dat{n}; 
< 0.001 
     72 
  49
     s = strcmpi(behavior_name,info.name); 
< 0.001 
     72 
  50
     if any(s) 
< 0.001 
      6 
  51
         behavior_name(s) = []; 
  0.018 
      6 
  52
         bh = feval(info.constructor); 
< 0.001 
      6 
  53
         if isempty(ret_h) 
< 0.001 
      6 
  54
             ret_h = bh; 
  55 
         else
  56 
             ret_h(end+1) = bh;
< 0.001 
      6 
  57
         end 
< 0.001 
     72 
  58
     end 
< 0.001 
     72 
  59
end 

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