Rendering is not done by SAS for all destinations. So, even if you saved the output object to the DOCUMENT destination, you would have to replay the output object to LISTING destination (capture that time) and then replay the same output object to each of PDF, RTF and HTML in turn -- I would expect that all 3 of those replays would take more time than replaying to the LISTING destination because of the added markup/translation/overhead that comes with those destination file formats.
It seems to me that since RENDERING is done by the RENDERING APP (Word, Acrobat Reader, browser), you would want to prevent SAS from launching any of these helper apps. Then, the time is EXCLUSIVE of 3rd party program launch and your log should measure time from the completed OUTPUT OBJECT (stored in ODS DOCUMENT form) to creation of the completed result file. That takes the rendering issue out of the picture -- since with PDF, HTML and RTF you are creating a file that is meant to be opened outside of SAS -- and just leaves you with whatever overhead has accrued in going from the output object to the operating system destination file.
This is what I did with a fairly simple proc tabulate (seen at the top of the LOG):[pre]
NOTE: SAS 9.1.3 Service Pack 4
NOTE: SAS initialization used:
real time 1.72 seconds
cpu time 1.12 seconds
1 ods html file='somefile.html';
NOTE: Writing HTML Body file: somefile.html
2 ods rtf file='somefile.rtf';
NOTE: Writing RTF Body file: somefile.rtf
3 ods pdf file='somefile.pdf';
NOTE: Writing ODS PDF output to DISK destination
"C:\Documents and Settings\sasczz\somefile.pdf", printer "PDF".
4 proc tabulate data=sashelp.shoes;
5 var sales;
6 class region product;
7 table region all,
8 product*sales*(min mean max);
9 run;
NOTE: There were 395 observations read from the data set SASHELP.SHOES.
NOTE: PROCEDURE TABULATE used (Total process time):
real time 0.90 seconds
cpu time 0.29 seconds
10 ods _all_ close;
NOTE: ODS PDF printed 3 pages to C:\Documents and Settings\sasczz\somefile.pdf.
11 ods listing close;
12
13 ods document name=work.shoetab(write);
14
15 proc tabulate data=sashelp.shoes;
16 var sales;
17 class region product;
18 table region all,
19 product*sales*(min mean max);
20 run;
NOTE: There were 395 observations read from the data set SASHELP.SHOES.
NOTE: PROCEDURE TABULATE used (Total process time):
real time 0.18 seconds
cpu time 0.00 seconds
21
22 ods document close;
23 ods html file='somefile.html';
NOTE: Writing HTML Body file: somefile.html
24 proc document name=shoetab;
25 replay;
26 run;
27 quit;
NOTE: PROCEDURE DOCUMENT used (Total process time):
real time 0.15 seconds
cpu time 0.05 seconds
28 ods _all_ close;
29
30 ods rtf file='somefile.rtf';
NOTE: Writing RTF Body file: somefile.rtf
31 proc document name=shoetab;
32 replay;
33 run;
34 quit;
NOTE: PROCEDURE DOCUMENT used (Total process time):
real time 0.09 seconds
cpu time 0.03 seconds
35 ods _all_ close;
36 ods pdf file='somefile.pdf';
NOTE: Writing ODS PDF output to DISK destination
"C:\Documents and Settings\sasczz\somefile.pdf", printer "PDF".
37 proc document name=shoetab;
38 replay;
39 run;
40 quit;
NOTE: PROCEDURE DOCUMENT used (Total process time):
real time 0.12 seconds
cpu time 0.12 seconds
41 ods _all_ close;
NOTE: ODS PDF printed 3 pages to C:\Documents and Settings\sasczz\somefile.pdf.
42 ods listing;
43 proc document name=shoetab;
44 replay;
45 run;
46 quit;
NOTE: PROCEDURE DOCUMENT used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds
47 ods _all_ close;
48
49 ods listing;
50
51 proc tabulate data=sashelp.shoes;
52 var sales;
53 class region product;
54 table region all,
55 product*sales*(min mean max);
56 run;
NOTE: There were 395 observations read from the data set SASHELP.SHOES.
NOTE: PROCEDURE TABULATE used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
[/pre]
I probably should do all sorts of handwaving here because testing performance or making decisions on performance issues should NEVER be done from
just one run. The first run produced one set of numbers. Then, the individual steps, each replaying from the DOCUMENT store do not add up to those numbers, nor do I really expect that they would.
I had Outlook running and that could have affected the time, I had Word and PowerPoint running. So in my mind, this might approximate some kind of separation of OUTPUT OBJECT creation from DESTINATION file creation -- without making SAS launch any of the 3rd party rendering apps.
But to what end??? I could add the COMPRESS option or the COLUMNS option to PDF and I bet that would have an effect on the time. I could probably add some kind of option or pick a different tagset for HTML and that would have an effect on the time. Or I could use a tagset that checked to see if the variables were character or numeric and I bet that would take a LOT longer.
Real performance testing requires rigorous, almost neurotic procedures. Close down everything. Do a reboot. Only start the one app you're testing. Run your job/step/procedure. Capture the times. Log off. Do another reboot. start the one app you're testing. Change one thing. run your job/step/procedure. Capture the times. Log off. Do another reboot, etc, etc. Then do it all again with different data (more class variables) or do it all again with different options.
And I'm not sure what the real purpose of that kind of testing would be. You might be able to fine tune your system for performance--set different buffer sizes or different page file sizes -- or fine tune SAS in general -- but I don't think there's a lot you can do to fine tune ODS in the creation of destination files....not the same way that performance folks talk about fine tuning.
Just my .02,
cynthia