Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim some fat from the traversal #17741

Merged
merged 3 commits into from Jul 15, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Avoid memmoving the large smallvec in Parallel.rs.

MozReview-Commit-ID: 7nzjMwOmszZ
  • Loading branch information
bholley committed Jul 15, 2017
commit 2a58c0768b5c90f435eac6cb8614831a15c54b6c
@@ -29,7 +29,6 @@ use rayon;
use scoped_tls::ScopedTLS;
use smallvec::SmallVec;
use std::borrow::Borrow;
use std::mem;
use time;
use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken};

@@ -187,10 +186,9 @@ fn top_down_dom<'a, 'scope, E, D>(nodes: &'a [SendNode<E::ConcreteNode>],
//
// Which are not at all uncommon.
if !discovered_child_nodes.is_empty() {
let children = mem::replace(&mut discovered_child_nodes, Default::default());
let mut traversal_data_copy = traversal_data.clone();
traversal_data_copy.current_dom_depth += 1;
traverse_nodes(&*children,
traverse_nodes(&*discovered_child_nodes,
DispatchMode::NotTailCall,
recursion_depth,
root,
@@ -199,6 +197,7 @@ fn top_down_dom<'a, 'scope, E, D>(nodes: &'a [SendNode<E::ConcreteNode>],
pool,
traversal,
tls);
discovered_child_nodes.clear();
}

let node = **n;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.