This is a static copy of a profile report

Home

clearNotify (Calls: 2, Time: 0.003 s)
Generated 16-Jul-2020 17:08:44 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/+matlab/+graphics/+internal/clearNotify.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/claNotifyfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
20
if ~isempty(fig) && is...
20.001 s25.4%
10
f = ancestor(obj,'figure');
20.000 s9.3%
9
if isgraphics(obj) 
20.000 s9.2%
8
obj = h(k);
20.000 s8.6%
7
for k=1:length(h)
20.000 s8.4%
All other lines  0.001 s39.1%
Totals  0.003 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function34
Non-code lines (comments, blank lines)10
Code lines (lines that can run)24
Code lines that did run10
Code lines that did not run14
Coverage (did run/can run)41.67 %
Function listing
time 
Calls 
 line
   1 
function clearNotify(h, flag)
   2 
%clearNotify Perform actions when a figure has some content cleared
   3 

   4 
%   Copyright 2014-2016 The MathWorks, Inc.
   5 

< 0.001 
      2 
   6
fig = []; 
< 0.001 
      2 
   7
for k=1:length(h) 
< 0.001 
      2 
   8
    obj = h(k); 
< 0.001 
      2 
   9
    if isgraphics(obj)  
< 0.001 
      2 
  10
        f = ancestor(obj,'figure'); 
< 0.001 
      2 
  11
        if ~isempty(f) 
< 0.001 
      2 
  12
            fig = f; 
< 0.001 
      2 
  13
            break; 
  14 
        end
  15 
    end
  16 
end
  17 

  18 
% If this is a live script figure then capture any info before 
  19 
% the figure is cleared.
< 0.001 
      2 
  20
if ~isempty(fig) && isappdata(fig, 'EDITOR_APPDATA') 
  21 
    if nargin == 1
  22 
        flag = '';
  23 
    end
  24 
    v = getappdata(fig,'EDITOR_APPDATA');
  25 
    if ischar(v) && strcmp(v,'unittest') % unit testing API for when clearNotify is called.
  26 
        setappdata(fig,'EDITOR_APPDATA',flag);
  27 
    elseif strcmp(flag,'reset')
  28 
        % Since Live editor uses web graphics and clf('reset') is not
  29 
        % supported by web graphics, we need to trigger a morph.
  30 
        matlab.internal.editor.FigureManager.figureBeingReset(fig);
  31 
    else
  32 
        matlab.internal.editor.FigureManager.figureBeingCleared(fig, flag);
  33 
    end
< 0.001 
      2 
  34
end 

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