3.6 Selecting sequencing methods
This program uses a few
techniques when it is discovered that many passes
are needed to comply with the request.
For example, suppose that four elementary steps
were selected at recoding path optimisation time.
Then Recode will split itself into four different
interconnected tasks, logically equivalent to:
step1 <input | step2 | step3 | step4 >output
The
splitting into subtasks is often done using Unix
pipes. But the splitting may also be completely
avoided, and rather simulated by using memory
buffer, or intermediate files. The various
‘--sequence=strategy’
options gives you control over the flow methods, by
replacing strategy with
‘memory’,
‘pipe’ or
‘files’. So,
these options may be used to override the default
behaviour, which is also explained below.
- ‘--sequence=memory’
- When the
recoding requires a combination of two or more
elementary recoding steps, this option forces
many passes over the data, using in-memory
buffers to hold all intermediary results.
- ‘-i’
- ‘--sequence=files’
- When the recoding
requires a combination of two or more elementary
recoding steps, this option forces many passes
over the data, using intermediate files between
passes. This is the default behaviour when files
are recoded over themselves. If this option is
selected in filter mode, that is, when the
program reads standard input and writes standard
output, it might take longer for programs further
down the pipe chain to start receiving some
recoded data.
- ‘-p’
- ‘--sequence=pipe’
-
When the
recoding requires a combination of two or more
elementary recoding steps, this option forces
the program to fork itself into a few copies
interconnected with pipes, using the
pipe(2) system call. All copies of
the program operate in parallel. This is the
default behaviour in filter mode. If this
option is used when files are recoded over
themselves, this should also save disk space
because some temporary files might not be
needed, at the cost of more system overhead.
If, at installation time, the
pipe(2) call is said to be
unavailable, selecting option
‘-p’ is
equivalent to selecting option
‘-i’.
(This happens, for example, on MS-DOS
systems.)
|