mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Limit traversal statistics dumps to subtrees of 50 or more elements.
On Gecko, we get tons of console spam from 1-element traversals if we don't do this.
This commit is contained in:
parent
31ea4208cf
commit
591733408d
3 changed files with 12 additions and 2 deletions
|
@ -64,6 +64,8 @@ pub fn traverse_dom<E, D>(traversal: &D,
|
|||
if dump_stats {
|
||||
let tlsc = tlc.borrow_mut();
|
||||
tlsc.statistics.finish(traversal, start_time.unwrap());
|
||||
println!("{}", tlsc.statistics);
|
||||
if tlsc.statistics.is_large_traversal() {
|
||||
println!("{}", tlsc.statistics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue