in reply to Re^2: Am I on the right track?
in thread Am I on the right track?
Where my suggestion differs is that all the inputs are scanned first, before any output is done, and then there's a nested loop: for each output "group" file, create it, then for each input file in that group, concatenate its content. (If none of the inputs fall into a given group, there's no need to create an output file for that group.)
Opening and closing each output file exactly once is bound to involve less overhead on the whole, compared to randomly closing and reopening output files (but I have no idea whether the difference will be noticeable in wall-clock time).
Another thing to consider is whether you have to worry about an upper bound on the amount of data you can concatenate into one pdf file for a single print job. If so, I think my suggested approach would make it easier to manage that, because you can work out all the arithmetic for partitioning before creating any outputs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Am I on the right track?
by Pharazon (Acolyte) on Jul 13, 2015 at 17:08 UTC | |
by graff (Chancellor) on Jul 18, 2015 at 01:28 UTC |