Skip to content

Commit 0ffa980

Browse files
committed
---
yaml --- r: 83587 b: refs/heads/try c: fb25985 h: refs/heads/master i: 83585: 26788e7 83583: fa2e89f v: v3
1 parent 0c48941 commit 0ffa980

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: cc1791584f24f5cc734f2fe0a8d3937a72193076
5+
refs/heads/try: fb259855dc938e830eb532241ad75fc8d7c3b112
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustdoc/html/render.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use std::vec;
2828
use extra::arc::RWArc;
2929
use extra::json::ToJson;
3030
use extra::sort;
31+
use extra::time;
3132

3233
use syntax::ast;
3334
use syntax::ast_util::is_local;
@@ -179,6 +180,8 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
179180
w.flush();
180181
}
181182

183+
info2!("emitting source files");
184+
let started = time::precise_time_ns();
182185
{
183186
let dst = cx.dst.push("src");
184187
mkdir(&dst);
@@ -191,9 +194,14 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
191194
};
192195
crate = folder.fold_crate(crate);
193196
}
197+
let ended = time::precise_time_ns();
198+
info2!("Took {:.03f}s", (ended as f64 - started as f64) / 1e9f64);
194199

195-
// Now render the whole crate.
200+
info2!("rendering the whole crate");
201+
let started = time::precise_time_ns();
196202
cx.crate(crate, cache);
203+
let ended = time::precise_time_ns();
204+
info2!("Took {:.03f}s", (ended as f64 - started as f64) / 1e9f64);
197205
}
198206

199207
fn write(dst: Path, contents: &str) {
@@ -289,7 +297,8 @@ impl<'self> SourceCollector<'self> {
289297
}
290298
291299
let dst = cur.push(*p.components.last() + ".html");
292-
let mut w = dst.open_writer(io::CreateOrTruncate);
300+
let w = dst.open_writer(io::CreateOrTruncate);
301+
let mut w = BufferedWriter::new(w);
293302

294303
let title = format!("{} -- source", *dst.components.last());
295304
let page = layout::Page {
@@ -299,6 +308,7 @@ impl<'self> SourceCollector<'self> {
299308
};
300309
layout::render(&mut w as &mut io::Writer, &self.cx.layout,
301310
&page, &(""), &Source(contents.as_slice()));
311+
w.flush();
302312
return true;
303313
}
304314
}

branches/try/src/librustdoc/rustdoc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub fn main_args(args: &[~str]) -> int {
146146
}
147147
}
148148
let ended = time::precise_time_ns();
149-
info2!("Took {:.03f}s", (ended as f64 - started as f64) / 1000000000f64);
149+
info2!("Took {:.03f}s", (ended as f64 - started as f64) / 1e9f64);
150150

151151
return 0;
152152
}

0 commit comments

Comments
 (0)