mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Increase buffers for boost in performance.
(cherry picked from commit 4b702bc9522503b88d9084de2ce5780f75ee9e23)
This commit is contained in:
parent
a42bdea8ac
commit
893ab7c761
1 changed files with 2 additions and 2 deletions
|
@ -110,7 +110,7 @@ pub fn exec(files: ~[~str], number: NumberingMode, show_nonprint: bool, show_end
|
||||||
|
|
||||||
let mut writer = BufferedWriter::with_capacity(1024 * 8, stdout_raw());
|
let mut writer = BufferedWriter::with_capacity(1024 * 8, stdout_raw());
|
||||||
let mut at_line_start = true;
|
let mut at_line_start = true;
|
||||||
let mut buf = [0, .. 2];
|
let mut buf = ~[0, .. 1024 * 4];
|
||||||
loop {
|
loop {
|
||||||
// reading from a TTY seems to raise a condition on
|
// reading from a TTY seems to raise a condition on
|
||||||
// EOF, rather than return Some(0) like a file.
|
// EOF, rather than return Some(0) like a file.
|
||||||
|
@ -170,8 +170,8 @@ pub fn exec(files: ~[~str], number: NumberingMode, show_nonprint: bool, show_end
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut buf = [0, .. 100000];
|
|
||||||
let mut writer = stdout_raw();
|
let mut writer = stdout_raw();
|
||||||
|
let mut buf = ~[0, .. 1024 * 64];
|
||||||
// passthru mode
|
// passthru mode
|
||||||
for path in files.iter() {
|
for path in files.iter() {
|
||||||
let mut reader = match open(path.to_owned()) {
|
let mut reader = match open(path.to_owned()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue