-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.O-unixOperating system: Unix-likeOperating system: Unix-like
Description
std::process::Command::output
is unacceptably slow. Consider this code:
When trying this code, make sure you have enabled release mode. On my local machine I see this output:
1565 ms
100000000
103 ms
100000000
So std::process::Command::output
is 15x slower than std::io::BufReader::read_to_end()
. My rustc version is rustc 1.69.0-nightly (75a0be98f 2023-02-05)
. My OS is Debian Stretch x86_64
Metadata
Metadata
Assignees
Labels
A-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.O-unixOperating system: Unix-likeOperating system: Unix-like