How to get output of piped process?
Danny Arends
Danny.Arends at gmail.com
Wed Mar 3 20:37:34 UTC 2021
On Tuesday, 23 February 2021 at 10:07:03 UTC, Imperatorn wrote:
> On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
>> On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote:
>>> [...]
>>
>> Perhaps a bit late, but this is how I deal with pipes and
>> spawnShell.
>> Read one byte at a time from stdout and stderr:
>>
>> https://github.com/DannyArends/DaNode/blob/master/danode/process.d
>>
>> Danny
>
> Interesting, do you have any benchmarks for DaNode?
I used to run Apache bench on the code to make sure it was as
fast as possible, for static files it is pretty performant since
it buffers the files, and serves them directly from memory.
The main overhead comes from the external process booting up,
rdmd is nice since it only does the compile once then reuses the
compiled binary for external scripts. PHP and such are always hit
with the additional overhead.
Feel free to run your own tests, the development branch has the
latest version with some additional bug fixes not yet available
in the master branch, and feedback is welcome and can be posted
as an issue in Github
More information about the Digitalmars-d-learn
mailing list