mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 13:15:50 +00:00
Switch 'rojo build' to use BufWriter, magic performance increase
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::{
|
||||
path::PathBuf,
|
||||
fs::File,
|
||||
io,
|
||||
io::{self, Write, BufWriter},
|
||||
};
|
||||
|
||||
use log::info;
|
||||
@@ -92,7 +92,7 @@ pub fn build(options: &BuildOptions) -> Result<(), BuildError> {
|
||||
let mut imfs = Imfs::new();
|
||||
imfs.add_roots_from_project(&project)?;
|
||||
let tree = construct_oneoff_tree(&project, &imfs)?;
|
||||
let mut file = File::create(&options.output_file)?;
|
||||
let mut file = BufWriter::new(File::create(&options.output_file)?);
|
||||
|
||||
match output_kind {
|
||||
OutputKind::Rbxmx => {
|
||||
@@ -121,5 +121,7 @@ pub fn build(options: &BuildOptions) -> Result<(), BuildError> {
|
||||
},
|
||||
}
|
||||
|
||||
file.flush()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user