-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Linux, Powershell Core 7.2.3
When I try to pass large mounts of data (an image), for example:
$ curl -L https://download.opensuse.org/distribution/leap/15.4/appliances/iso/openSUSE-Leap-15.4-CR-DVD-x86_64-Media.iso | dd of=/dev/null
(with fast internet, alternatively one may try piping xzcat
's output to dd
).
Expected behavior
For the similar command bash doesn't use any CPU at all.
Actual behavior
CPU usage of `pwsh` process us 150-160% (4 cores).
Error details
I understand that pwsh may read input and split into lines while bash simply does `dup2`, but maybe there could be some short-circuit if both ends of pipe operator are fed to an external process.
Environment data
Name Value
---- -----
PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Linux 6.0.8-1-default #1 SMP PREEMPT_DYNAMIC Fri Nov 11 08:02:50 UTC 2022 (1579d93)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.The question is answered.Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.