|
From: | Thomas Danckaert |
Subject: | Re: reading from input pipe is slow? |
Date: | Mon, 25 Jun 2018 13:32:04 +0200 (CEST) |
Hi Mark,indeed, setting buffering with (setvbuf ...) solved the issue. Thanks a lot!
For some reason that I don't know, possibly historical, the pipes created by procedures in (ice-9 popen) are unbuffered by default.
I think you're right, but doesn't the manual suggest otherwise, when it says "Each direction has PIPE_BUF bytes of buffering" (https://www.gnu.org/software/guile/manual/html_node/Pipes.html)? Or do I misinterpret that?
Also, let me mention that the statistical profiler from the (statprof) module has been very useful to isolate the problem. Initially I assumed the slowness was due to the external process. Only after running statprof did I realize that the problem was in my code.
Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |