Desktop productivity for business analysts and programmers

PROC GPLOT takes a LONG time to create a PDF

Not applicable
Posts: 0

PROC GPLOT takes a LONG time to create a PDF

I am using EG to create plots and a report and would like the output to be a PDF so that I can easily save and distribute the information. When I change the default to create a PDF (using the RESULTS option). The problem is that when I do this, the procedures take a VERY long time to complete, for example, more than 4 minutes real time (0.09 seconds CPU time) to complete 1 PROC GPLOT (with only 120 observations) vs. less than half that if I am not creating a PDF.

Can I change any settings so that this won't take so long to run?
Posts: 9,434

Re: PROC GPLOT takes a LONG time to create a PDF

Posted in reply to deleted_user

When you are creating the default graphic output, EG and SAS and SAS/GRAPH only have to create 1 image file and the HTML code that will point to the image file.

But, when you create a PDF or RTF file, 2 steps happen
1) the image is created
2) -THEN- the image is embedded in the PDF or RTF file using the "internal" graph description format used for PDF and/or RTF.

This second step is adding some overhead because of the conversion needed for embedding. Sort of like drawing a picture and then taking extra time to manually recopy the picture to another sheet of paper (in an office where you don't have a copy machine).

By itself, the embedding process is adding overhead...but then the PDF file creation is also impacted by the COMPRESS level that's being used for the now, you're not just recopying the picture to another piece of paper, you're squishing it as part of the copy process. More overhead.

This may be a relevant Tech Support note:

Since you are running in EG, changing the COMPRESS option might not be easy for you to alter, since you would have to specify

COMPRESS=1 or COMPRESS=4 on the ODS PDF statement that EG generates for you. I can't remember whether there is an option to specify only part of the ODS PDF statement. The default COMPRESS level is set to 6... you could try experimenting with ODS PDF and setting COMPRESS to 0 and then ratcheting up to 6. Although you can go from 0 to 9, you probably don't want to go beyond 6, since that's too slow for you now.

You might also want to work with Tech Support on this question, too, as there are other issues that might be arising...such as the ones mentioned in these notes:

Tech Support can help you figure out the best approach.

Community Manager
Posts: 3,463

Re: PROC GPLOT takes a LONG time to create a PDF

Posted in reply to deleted_user
One factor might be the graph device type. The default device is ACTIVEX (useful in HTML and SAS Report) and is dynamic. But PDF is a static result and needs an image file, so SAS falls back to ACTXIMG (same appearance, but in PNG form). If your server is not Windows, then ACTXIMG can't work so SAS falls back to JAVAIMG (also a PNG, but rendered with Java technology).

You might try to control things a bit more by setting the Graph result type to PNG, GIF, or JPEG. The image might look a little different. In SAS 9.2 you still get the nice graph styles with these image types.

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation