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:
Bobby Holley 2017-04-12 17:36:38 +08:00
parent 31ea4208cf
commit 591733408d
3 changed files with 12 additions and 2 deletions

View file

@ -86,7 +86,9 @@ pub fn traverse_dom<E, D>(traversal: &D,
}
});
aggregate.finish(traversal, start_time.unwrap());
println!("{}", aggregate);
if aggregate.is_large_traversal() {
println!("{}", aggregate);
}
}
}