New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipes between native processes are too slow #2176
Comments
|
No. There is NOT pipes between native commands. When invoking a native command, PowerShell runs the command, interprets the If you are sending an object to a native command, PowerShell outputs it into the With those two combined, if you do Use |
|
I am aware that this is not the current implementation and that is what I would like changed. The object in the middle model makes sense for functions and commandlets, but not native processes, both in terms of efficiency and possible data corruption. If you believe this is a feature and not a deficiency, could you provide a concrete user case? Get Outlook for Android On Mon, Sep 5, 2016 at 12:07 AM -0700, "Gee Law" notifications@github.com wrote: No. There is NOT pipes between native commands. When invoking a native command, PowerShell runs the command, interprets the stdout of it and make it a typed output. If you are sending an object to a native command, PowerShell outputs it into the stdin of that command. With those two combined, if you do native | native on PowerShell, PowerShell will "help" you corrupt the stdout of the first native and of course, the stdin of the second native. Use Start-Process or System.Diagnostics.Process to invoke native commands. — |
|
I don't believe that this is a useful feature. There is already an issue addressing this. See #559. This issue is mostly a duplicate/sunset of that issue. And do note my sarcasm on this "smart oo pipe between native utilities", I said PS "helped" you currput the streams. |
Problem: Native (non-object) pipes between native processes are ~1000X faster versus PowerShell object pipes. This is especially problematic for us systems people who like to work on 500MB-5GB files routinely.
Proposed solution: Automatically detect 2 native processes (neither is a function nor commandlet), and use a direct system pipe.
Timings from my box:
*FastPipe is a hack I wrote that stringifies the scriptblock and passes it to cmd.exe for its faster raw pipes. Perhaps this is the best solution for now?
The text was updated successfully, but these errors were encountered: