forked from rojo-rbx/rojo
Switch 'rojo build' to use BufWriter, magic performance increase
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Rojo Changelog
|
||||
|
||||
## [Unreleased]
|
||||
* Changed `rojo build` to use buffered I/O, which can make it up to 2x faster in some cases.
|
||||
* Building [*Road Not Taken*](https://github.com/LPGhatguy/roads) to an `rbxlx` file dropped from 150ms to 70ms on my machine
|
||||
|
||||
## [0.5.0 Alpha 8](https://github.com/LPGhatguy/rojo/releases/tag/v0.5.0-alpha.8) (March 29, 2019)
|
||||
* Added support for a bunch of new types when dealing with XML model/place files:
|
||||
|
||||
@@ -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