Decreasing Spooling Time
- Date: Nov 03, 2015
Decreasing Spooling Time3 Nov, 2015
While the above information dictates how CD Plus does work, it is important to take a minute to discuss how CD Plus should work. CD Plus will look at every file coming into OM Plus. As such, if it is not configured to be as efficient as possible, undesired printing delays can result. To see how this plays out, let’s set up an example.
Consider a case where print jobs are being written to a folder and picked up for spooling by the Scan Service. These jobs contain a destination name at the beginning of the title that CD Plus must find and use. The naming convention for these destinations is a letter followed by a two digit number (for example A56, K78, Z99). There are, indeed, 2600 destinations.
The first thing is to fail early and fail often. Set up one quick test will save any non-CD Plus jobs from traveling through the entire list of parameters. In this case, the easiest thing would be to have the first level filter by spooling destination. Doing so means that only jobs coming in through the Scan Service would go on for additional testing while all other jobs immediately fail out and exit CD Plus unchanged. That could significantly reduce the processing times required for any job that doesn’t need CD Plus.
Next, think in terms of levels. It would be tempting* to set up 2600 second level parameters to test these jobs, but think about a job headed for destination Z99. That job would have to pass through all 2600 definitions before it finally matched. This would take time and resources. It would be more efficient to set up 26 second level parameters to catch jobs by their starting letter, then define things further in a third level parameter that matches the numbers. This way job Z99 would only check against 126 parameters. In fact, every job for a destination starting with a letter except “A” would see significant gains, while “A” printers would only see a slight loss. There would, though, be 2626 (26 second level and 100 each 3rd level) parameters that need to be configured.
Even better, think about Regular Expressions. Thinking ahead can save a lot of time. If the printers are defined in OM Plus using the same naming convention, then a simple regular expression like “[A-Z]\d+” would catch the destination name and $MATCH# could be used to enter that in the destination field. That could condense 2600 lines of parameters into one. That would be a significant performance gain all around, to say the least.
Finally, if possible, use properties, not data. This whole exercise is looking just at the job title. That is one of the properties that we can see easily. If CD Plus needs to look into the file using one of the “Data Contains” matches, try to make that a final step and one only used if every other step has failed. Opening the file to read the data takes time and resources. It can be done if there’s no other way, but it is, by far, the least efficient thing CD Plus does. If a file must be opened, limit the reading to as few lines or bytes as possible. If a 400 MB file spools in and does not match, CD Plus will open and read all 400 MB before it lets it fall through to the next test if it is not limited. If it’s limited to the first 20 lines, then the test will go much faster. If CD Plus was able to take action before this based solely on the properties of the print job, that would be even better. This could require some modifications to the spooling process or application, but if thousands of jobs are affected, it could provide worthwhile.