This is a static copy of a profile report

Home

Function details for allchildThis is a static copy of a profile report

Home

allchild (Calls: 10, Time: 0.017 s)
Generated 02-May-2020 21:54:26 using performance time.
function in file /Applications/MATLAB_R2018a.app/toolbox/matlab/uitools/allchild.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
close>safegetchildrensubfunction6
...rnatePrintPath>LocalFindContainerssubfunction2
graphics/private/adjustbackgroundfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
40
ChildList = getchildren(Handle...
100.004 s21.4%
50
end 
100.003 s16.9%
37
c = onCleanup(@()set(rootobj,'...
100.003 s16.4%
32
rootobj = allchildRootHelper(H...
100.002 s11.3%
35
set(rootobj,'ShowHiddenHandles...
100.001 s6.8%
All other lines  0.005 s27.3%
Totals  0.017 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
allchild>getchildrensubfunction100.003 s18.0%
onCleanup>onCleanup.deleteclass method100.002 s11.4%
uitools/private/allchildRootHelperfunction100.001 s7.7%
onCleanup>onCleanup.onCleanupclass method100.001 s3.3%
Self time (built-ins, overhead, etc.)  0.010 s59.5%
Totals  0.017 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function50
Non-code lines (comments, blank lines)29
Code lines (lines that can run)21
Code lines that did run12
Code lines that did not run9
Coverage (did run/can run)57.14 %
Function listing
time 
Calls 
 line
   1 
function ChildList=allchild(HandleList)
   2 
%ALLCHILD Get all object children
   3 
%   ChildList=ALLCHILD(HandleList) returns the list of all children 
   4 
%   (including ones with hidden handles) for each handle.  If 
   5 
%   HandleList is a single element, the output is returned in a 
   6 
%   vector.  Otherwise, the output is a cell array.
   7 
%
   8 
%   Example:
   9 
%       h_gca = gca;
  10 
%       h_gca.Children
  11 
%           %or
  12 
%       allchild(gca)
  13 
%
  14 
%   See also GET, FINDALL.
  15 

  16 
%   Loren Dean
  17 
%   Copyright 1984-2015 The MathWorks, Inc.
  18 
%    
  19 

< 0.001 
     10 
  20
narginchk(1,1); 
  21 

  22 
% figure out which, if any, items in list don't refer to hg objects
< 0.001 
     10 
  23
hgIdx = ishghandle(HandleList); % index of hghandles in list 
< 0.001 
     10 
  24
nonHGHandleList = HandleList(~hgIdx);  
  25 

  26 
% if any of the items in the nonHGHandlList aren't handles, error out
< 0.001 
     10 
  27
if ~isempty(nonHGHandleList) && ~all(ishandle(nonHGHandleList)) 
  28 
  error(message('MATLAB:allchild:InvalidHandles'))
  29 
end  
  30 

  31 
% establish the root object
  0.002 
     10 
  32
rootobj = allchildRootHelper(HandleList); 
  33 

< 0.001 
     10 
  34
Temp=get(rootobj,'ShowHiddenHandles'); 
  0.001 
     10 
  35
set(rootobj,'ShowHiddenHandles','on'); 
  36 
% Create protected cleanup
  0.003 
     10 
  37
c = onCleanup(@()set(rootobj,'ShowHiddenHandles',Temp)); 
  38 

< 0.001 
     10 
  39
if(isscalar(HandleList)) 
  0.004 
     10 
  40
    ChildList = getchildren(HandleList); 
  41 
else
  42 
    l = arrayfun(@getchildren,HandleList,'UniformOutput',false);
  43 
    if isempty(l)
  44 
        ChildList = []; % return [] if no objects found
  45 
    else
  46 
        ChildList = l(:);
  47 
    end
< 0.001 
     10 
  48
end 
  49 

  0.003 
     10 
  50
end  

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