I had posted about EG being slow in a project given to me and ideas of how to speed it up. The first one was to export all the code and run it in base SAS via:
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -SYSIN "R:\SAS Batch\SAS Programs\Partial V4.sas" -LOG "R:\SAS Batch\Logs\Partial\Partial2D_%today%.log" -PRINT "R:\SAS Batch\LST\Partial2D.lst"
The original EG run time is 70 minutes. Sending the code to Base SAS via above is 2 minutes....same results every time.
Why is this? Seems like this is they way to go without doing anything else. What is EG doing to make it so slow?
As someone mentioned in the previous thread - ODS output, HTML etc take up a lot of time to generate. Did you turn off outputs?
@BCNAV wrote:
I had posted about EG being slow in a project given to me and ideas of how to speed it up. The first one was to export all the code and run it in base SAS via:
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -SYSIN "R:\SAS Batch\SAS Programs\Partial V4.sas" -LOG "R:\SAS Batch\Logs\Partial\Partial2D_%today%.log" -PRINT "R:\SAS Batch\LST\Partial2D.lst"
The original EG run time is 70 minutes. Sending the code to Base SAS via above is 2 minutes....same results every time.
Why is this? Seems like this is they way to go without doing anything else. What is EG doing to make it so slow?
There are no ODS or HTML commands used...or is EG doing something on its own? What ODS commands/HTML commands should be run in a code node first?
would it be:
ods graphics off; ods exclude all; ods noresults;
ods html close;
thx
BTW, there is no ODS output, just SQL (joins/merges) and datasteps
If you can you might also post the code you have in "R:\SAS Batch\SAS Programs\Partial V4.sas"
That might give hints as to what is slower in EG.
Well...it is a huge program, so I'm thinking I won't post.Very nice how fast it is when sent to base SAS.
So....is there anything in a code node that I can run before any of the other process flows that would speed up EG? In the end it doesn't matter, as I have a quick solution now. But it would be nice to figure out what EG is doing that makes it so slow.
see attached....no so big after all
Very interesting; as you've found a workaround, I assume this has become an intellectual exercise. As such, it's an interesting one. Everything that you've said, and everything that the other posters have said, makes perfect sense in my opinion. I've taken a very quick look at the code, and I don't see anything that would intrinsically cause it to run significantly slower in EG than using your base SAS execution.
Here are a few things that occur to me:
If you have any energy for continuing to chase this down, you could put this before your first piece of SAS code, and after the last piece, and see if the times shown make sense in terms of what the elapsed time appears to be to you.
data _null_;
file log;
TimeStamp = put(datetime(), datetime.);
put TimeStamp=;
run;
If you do chase this down, please let us know what the solution is. I'm quite intrigued!
Tom
Same machine....and yes it has become an intellectual exercise to figure this out....EG is slow.
I do use the start end time you suggest. Here is my latest:
EG:
Time Partial Started | 2019-06-03 9:17 |
Time Partial Ended | 2019-06-03 10:45 |
Time Taken (Minutes) | 88.45 |
Exported Code
Time Partial Started | 2019-06-03 12:23 |
Time Partial Ended | 2019-06-03 12:26 |
Time Taken (Minutes) | 3.53 |
So bizarre!
I would compare the SAS logs of the two runs to identify which steps have the biggest time differences. It might also be worth using the SAS option FULLSTIMER and compare memory usage as well.
Our EG versus batch run times are pretty much the same, as they should be, except where ODS is involved.
It sounds like you exported all the code from your EG project to "Partial V4.sas" and then compared the time it takes the original EG project to run to the time it takes Base SAS to run the exported code "Partial V4.sas". How long does it take EG to run "Partial V4.sas" (run the exported code in a new EG session, rather than running the original EG project)? It should be very similar to the amount of time it takes Base SAS to run it, especially if EG isn't configured to generate ODS results (if you don't have any results formats checked in EG's Tools->Options->Results->Results General).
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
My EG Results General Tab is attached
Ok, thanks. You could try unchecking the "SAS Report" results format (ODS results) and see if it makes a difference. It would also be helpful to know the answer to my previous question...
How long does it take EG to run "Partial V4.sas" (run the exported code in a new EG session, rather than running the original EG project)?
Were the earlier times you posted (~88 mins) for EG how long it took EG to run the original EG project or for EG to run the single program file "Partial V4.sas"? Assuming it was the amount of time it took EG to run the original EG project, I'd like to know how long it takes EG to run the single program file (Partial V4.sas), so we can then compare that to running the same program in Base SAS.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.