Large or multiple Compound Reports with NOBREAK, poor performance
I've been having problems with a set of PDF statements, and have tried many different solutions to try and get the performance a little quicker.
The statements are made up of several components that in most cases need to follow the previous component, i.e. a NOBREAK.
This particular statement run will produce 2,500 statements.
Problem
As mentioned in a previous post, I tried a compound layout to do the whole thing, and found an issue at component 10,001.
So I changed the process to only have small compound layouts. This started out great, the first 100 or so statements were produced every 3 seconds, but as the processing moved on, the performance degradation increased until I had to kill the report after almost 24 hours and about 1500 statements.
I changed things around and made sure that all hold files going into the statement build were FOCUS files, as there was a big loop creating each statement one at a time.
This improved things marginally.
Next, changed the process to use the old COMPOUND OPEN/NOBREAK/CLOSE. This started very quick, but again the same degradation happened, and after a couple of hundred statements the degradation was worse than using the COMPOUND LAYOUT command.
Here is a graph of the performance of the 1500 statements.

Solution
Working on the idea that the old COMPOUND OPEN/NOBREAK/CLOSE is initially quicker, and that the current agent has some sort of issue with multiple or large compound documents that have NOBREAK functionality in it, I decided to try creating each statement in a new agent. This is done with a REMOTE DEST LOOPBACK, and some code.
The process goes...
- Write all hold files used in the statement created as FOCUS files. No need to use FILEDEF to allocate the files.
- Write out the required code to a temporary fex TMP_FEX
- Get the agents temp location with TEMPPATH
- Add REMOTE DEST LOOPBACK
- Add -REMOTE BEGIN
- Add APP MAP TMP_PATH to the temp path
- Add APP PATH TMP_PATH + any others needed.
- Add EX TMP_FEX required variable list
- Add -REMOTE END
- Add REMOTE FIN LOOPBACK to end this agent, otherwise the next call will use the same agent.
Here is a graph of the performance with the new code for all 2500 statements.

And the comparison.

All 2500 were created within 3 hours.
This tip is also posted on Focal Point. Any questions, please contact Warren at wazzah@jerridyne.com.