ODS Graphics, HTML results may add to procedure execution time


The default behavior for the SAS® windowing environment under Microsoft Windows, UNIX, and Linux operating systems has changed beginning with SAS 9.3 as described in SAS Note 42874. Two of the changes that can affect the execution time of your program are discussed below. The effect of using the Results window is also discussed.

ODS Graphics is enabled by default

When ODS Graphics is enabled, many procedures produce graphs by default. The ODS Graphics subsystem must be loaded into memory when the first graph is produced. This means that the procedure producing the first ODS graph in your SAS session will require the additional time needed to load the ODS Graphics subsystem. Subsequent procedures in the session, even a repetition of the first procedure, will not require this additional time. The additional time to produce the first ODS graph also occurs in releases prior to SAS 9.3, but ODS graphs are not produced by procedures until you specify the ods graphics on; statement to enable ODS Graphics.

HTML is the default destination for all output

Sending output to the HTML destination takes slightly longer than sending output to the Listing destination. In releases prior to SAS 9.3, the Listing destination (Output window) was the default.

In SAS 9.3 and later, if you are not interested in producing ODS graphs with your analyses, you can disable ODS Graphics. You can also send results to the Listing destination rather than the HTML destination. These statements disable ODS Graphics, close the HTML destination, and open the Listing destination.

   ods graphics off;
   ods html close;
   ods listing;

Later in your SAS session, if you want to enable ODS Graphics and produce HTML results, submit the following statements:

   ods listing close;
   ods html;
   ods graphics on;

If you want to change the default in the SAS windowing environment so that you do not need to submit these statements every time you initialize SAS, click ToolsOptionsPreferences in the menu bar at the top of the main SAS window. In the Preferences window that appears, select the Results tab. Check the "Use ODS Graphics" box to have ODS Graphics enabled by default or clear the box to have ODS Graphics disabled by default. Check the "Use listing" or the "Use HTML" box, or both if desired, to have results displayed in the Listing destination (Output window) and/or the HTML destination (browser, either internal or external, determined by the "View results using" selection).

Accumulating results in the Results window

On a related note, when you process a large number of BY groups in a procedure, accumulating the results for each BY group in the Results window can increase the processing time significantly. You might want to disable the accumulation of results in the Results window by the submitting the following statement before running the procedure:

ods noresults;

To re-enable the accumulating of the results in the Results window, submit the following statement:

ods results;