Skip to content

Reading from in_stream is extremely slow by default #774

Open
@atleta

Description

@atleta

I've run into this using fabric2, but it seems to be an invoke issue: run passes data from in_stream to the process in an extremely slow manner. About 90 CPS (yes, that is characters per second). So if I enable echo_stdin, it looks like a screen from your typical hacker movie (only without the chirp).

Now while writing this bug report, I found a hint in the code (and then in the documentation) that this was intentional: input_sleep is set to 0.01 on invoke.Runner. But this seems like a pretty surprising default and, at least compared to the effect and the surprise factor, not a very well documented one. Also, probably my fault, but I did not find a way how to set it or disable it. After skimming the documentation, I have no idea which key to set.

I've figured out how to set echo_stdin using the environment variables when running things from fabric, but the same scheme did not work out for input_sleep. Which means I wasn't able to guess the correct key. I've tried runners.local.input_sleep and `run.input_sleep. (So I ended up importing the class and then assigning 0 to the member but that's pretty lame.)

Actually, what's the point of this at all? If the input is not ready, the read will block anyway. If it's ready, why slow things down?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions