[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: poor make-pipe-stream performance
- To: firstname.lastname@example.org
- Subject: Re: poor make-pipe-stream performance
- From: haible (Bruno Haible)
- Date: Thu, 9 Dec 93 17:26:41 +0100
Marcus Daniels <email@example.com> compares CLISP pipes to AKCL pipes:
> Real-time `Run-time'
> CLISP Straight (local) file: 37.6 35.1
> CLISP MKFIFO file: 258.3 151.04
> CLISP MAKE-PIPE-INPUT-STREAM 232.9 145.27
> AKCL Straight (local) file: 33.0 N/A
> AKCL RUN-PROCESS 58.0 N/A
CLISP buffers regular files, because I can assume that the contents of a
regular file won't change. When CLISP OPENs anything else (socket, fifo,
pipe to another program) I didn't dare to make these streams buffered
since reading too much or writing too late may have undesired effects
(e.g. if one end of such a stream is interactive, or require FINISH-OUTPUT
after every write operation, or even dead-locks).
Thus when you READ from a pipe, READ-CHAR calls the operating system's read()
function once for every character.
It's not fast, but it is safe.
You may use temporary files instead of pipes. Which to use depends on the
amount of data you wish to transport, and on the operating system of course.