perf: Buffer stderr when writing json errors/warnings
Since `stderr` is unbuffered, writing out json messages actually take up about ~10%/0.1s of the runtime of the `inflate` benchmark. cc #64413
This commit is contained in:
parent
75b98fbe77
commit
7ac4154643
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ impl JsonEmitter {
|
|||
macro_backtrace: bool,
|
||||
) -> JsonEmitter {
|
||||
JsonEmitter {
|
||||
dst: Box::new(io::stderr()),
|
||||
dst: Box::new(io::BufWriter::new(io::stderr())),
|
||||
registry,
|
||||
sm: source_map,
|
||||
pretty,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue