This is a static copy of a profile report

Home

Function details for graphics/private/fireprintbehaviorThis is a static copy of a profile report

Home

graphics/private/fireprintbehavior (Calls: 2, Time: 0.027 s)
Generated 02-May-2020 21:54:29 using performance time.
function in file /Applications/MATLAB_R2018a.app/toolbox/matlab/graphics/private/fireprintbehavior.m
Copy to new window for comparing multiple runs

Parents (calling functions)

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

Line NumberCodeCallsTotal Time% TimeTime Plot
8
allobj = findall(h, 'Type', 'f...
20.018 s65.6%
17
behavior = hggetbehavior(obj,'...
40.006 s21.9%
16
if ishandle(obj) % callbacks m...
40.001 s2.7%
15
obj = allobj(k);
40.001 s2.4%
7
h = pj.Handles{1};
20.000 s1.6%
All other lines  0.002 s5.7%
Totals  0.027 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
findallfunction20.017 s63.2%
hggetbehaviorfunction40.005 s19.1%
Self time (built-ins, overhead, etc.)  0.005 s17.7%
Totals  0.027 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function41
Non-code lines (comments, blank lines)14
Code lines (lines that can run)27
Code lines that did run10
Code lines that did not run17
Coverage (did run/can run)37.04 %
Function listing
time 
Calls 
 line
   1 
function fireprintbehavior(pj,callbackName)
   2 
    %FIREPRINTBEHAVIOR Fire callback for Print behavior customization
   3 
    %    Helper function for printing. Do not call directly.
   4 
     
   5 
    %   Copyright 1984-2017 The MathWorks, Inc.
   6 

< 0.001 
      2 
   7
    h = pj.Handles{1}; 
  0.018 
      2 
   8
    allobj = findall(h, 'Type', 'figure', ... 
   9 
                 '-or', 'Type', 'axes', ...
  10 
                 '-or', 'Type', 'polaraxes', ...
  11 
                 '-or', 'Type', 'legend', ...
  12 
                 '-or', '-isa', 'matlab.graphics.shape.internal.ScribeGrid', ...
  13 
                 '-or', '-isa', 'matlab.graphics.chart.Chart');
< 0.001 
      2 
  14
    for k=1:length(allobj) 
< 0.001 
      4 
  15
        obj = allobj(k); 
< 0.001 
      4 
  16
        if ishandle(obj) % callbacks might delete other handles 
  0.006 
      4 
  17
            behavior = hggetbehavior(obj,'Print','-peek'); 
< 0.001 
      4 
  18
            if ~isempty(behavior) && isprop(behavior, callbackName) && ... 
  19 
                    ~isempty(get(behavior,callbackName))
  20 
                
  21 
                % provide appdata for obj to use during its print callback
  22 
                pci.DriverClass = pj.DriverClass;
  23 
                setappdata(obj,'PrintCallbackInfo',pci);
  24 
                c = onCleanup(@() rmappdata(obj,'PrintCallbackInfo'));
  25 
                
  26 
                cb = get(behavior,callbackName);
  27 
                if isa(cb,'function_handle')
  28 
                    cb(handle(obj),callbackName);
  29 
                elseif iscell(cb)
  30 
                    if length(cb) > 1
  31 
                        feval(cb{1},handle(obj),callbackName,cb{2:end});
  32 
                    else
  33 
                        feval(cb{1},handle(obj),callbackName);
  34 
                    end
  35 
                else
  36 
                    feval(cb,handle(obj),callbackName);
  37 
                end
  38 
            end
< 0.001 
      4 
  39
        end 
< 0.001 
      4 
  40
    end 
< 0.001 
      2 
  41
end 

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