This is a static copy of a profile report

Home

findall (Calls: 4, Time: 0.007 s)
Generated 18-May-2021 16:05:22 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/graphics/objectsystem/findall.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
subplotfunction4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
37
c = onCleanup(showHiddenHandle...
40.003 s48.3%
41
ObjList=findobj(HandleList,var...
40.001 s21.4%
48
end
40.001 s14.8%
28
if ~isempty( HandleList )
40.000 s4.2%
29
rootobj = groot;
40.000 s3.5%
All other lines  0.001 s7.7%
Totals  0.007 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...>showHiddenHandlesToFindAllHandlessubfunction40.001 s21.9%
...set(rootobj,'ShowHiddenHandles',Temp)anonymous function40.001 s10.2%
...nPane>AnnotationPane.getParentImplclass method60.000 s5.6%
Self time (built-ins, overhead, etc.)  0.004 s62.3%
Totals  0.007 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function48
Non-code lines (comments, blank lines)32
Code lines (lines that can run)16
Code lines that did run12
Code lines that did not run4
Coverage (did run/can run)75.00 %
Function listing
time 
Calls 
 line
   1 
function ObjList=findall(HandleList,varargin)
   2 
%FINDALL find all objects.
   3 
%   ObjList=FINDALL(HandleList) returns the list of all objects 
   4 
%   beneath the Handles passed in.  FINDOBJ is used and all objects
   5 
%   including those with HandleVisibility set to 'off' are found.
   6 
%   FINDALL is called exactly as FINDOBJ is called.  For instance,
   7 
%   ObjList=findall(HandleList,Param1,Val1,Param2,Val2, ...).
   8 
%  
   9 
%   Example:
  10 
%     plot(1:10)
  11 
%     xlabel xlab
  12 
%     a=findall(gcf)
  13 
%     b=findobj(gcf)
  14 
%     c=findall(b,'Type','text') % return the xlabel handle twice
  15 
%     d=findobj(b,'Type','text') % can't find the xlabel handle
  16 
%
  17 
%   See also ALLCHILD, FINDOBJ.
  18 

  19 
%   Loren Dean
  20 
%   Copyright 1984-2017 The MathWorks, Inc.
  21 

  22 

      4 
  23
if ~isa(HandleList,'matlab.graphics.Graphics') && nnz(~ishghandle(HandleList)) 
  24 
    error(message('MATLAB:findall:InvalidHandles'));
< 0.001 
      4 
  25
end 
  26 
    
      4 
  27
rootobj = 0; 
< 0.001 
      4 
  28
if ~isempty( HandleList ) 
< 0.001 
      4 
  29
    rootobj = groot; 
      4 
  30
end 
  31 

  32 
%Set up an onCleanup object that would restore the root global state after
  33 
%we do a findobj. We are explicitly making sure that there are no
  34 
%nested/anonymous functions involved here because findall executed through
  35 
%a timer callback is causing unexpected failure modes with onCleanup.
  36 
%Making a sub-function return an anonymous function handle is safer here.
  0.003 
      4 
  37
c = onCleanup(showHiddenHandlesToFindAllHandles(rootobj)); 
  38 

  39 

      4 
  40
try 
  0.001 
      4 
  41
  ObjList=findobj(HandleList,varargin{:}); 
  42 
catch ex %#ok
  43 
  ObjList=-1;
      4 
  44
end 
  45 

< 0.001 
      4 
  46
if isequal(ObjList,-1) 
  47 
  error(message('MATLAB:findall:InvalidParameter'));
< 0.001 
      4 
  48
end 

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