mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
layout: Perform aux initialization in parallel.
Brings aux initialization time down to essentially zero (!)
This commit is contained in:
parent
6c2e48f04d
commit
94ab4f5086
3 changed files with 19 additions and 4 deletions
|
@ -324,6 +324,7 @@ impl LayoutTask {
|
|||
constellation_chan: self.constellation_chan.clone(),
|
||||
dom_leaf_set: self.dom_leaf_set.clone(),
|
||||
flow_leaf_set: self.flow_leaf_set.clone(),
|
||||
layout_chan: self.chan.clone(),
|
||||
font_context_info: font_context_info,
|
||||
stylist: &*self.stylist,
|
||||
reflow_root: OpaqueNode::from_layout_node(reflow_root),
|
||||
|
@ -549,10 +550,13 @@ impl LayoutTask {
|
|||
|| {
|
||||
// Initialize layout data for each node.
|
||||
//
|
||||
// FIXME: This is inefficient. We don't need an entire traversal to do this!
|
||||
profile(time::LayoutAuxInitCategory, self.profiler_chan.clone(), || {
|
||||
node.initialize_style_for_subtree(self.chan.clone());
|
||||
});
|
||||
// FIXME(pcwalton): This is inefficient. We don't need an entire traversal to do this
|
||||
// in sequential mode!
|
||||
if self.parallel_traversal.is_none() {
|
||||
profile(time::LayoutAuxInitCategory, self.profiler_chan.clone(), || {
|
||||
node.initialize_style_for_subtree(self.chan.clone());
|
||||
});
|
||||
}
|
||||
|
||||
// Perform CSS selector matching if necessary.
|
||||
match data.damage.level {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue