mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Time compute_layout
This commit is contained in:
parent
8f6649e29e
commit
8814ea8241
1 changed files with 4 additions and 2 deletions
|
@ -111,8 +111,8 @@ impl TaffyLayoutEngine {
|
||||||
id: LayoutId,
|
id: LayoutId,
|
||||||
available_space: Size<AvailableSpace>,
|
available_space: Size<AvailableSpace>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
println!("Laying out {} children", self.count_all_children(id)?);
|
// println!("Laying out {} children", self.count_all_children(id)?);
|
||||||
println!("Max layout depth: {}", self.max_depth(0, id)?);
|
// println!("Max layout depth: {}", self.max_depth(0, id)?);
|
||||||
|
|
||||||
// Output the edges (branches) of the tree in Mermaid format for visualization.
|
// Output the edges (branches) of the tree in Mermaid format for visualization.
|
||||||
// println!("Edges:");
|
// println!("Edges:");
|
||||||
|
@ -121,8 +121,10 @@ impl TaffyLayoutEngine {
|
||||||
// }
|
// }
|
||||||
// println!("");
|
// println!("");
|
||||||
|
|
||||||
|
let started_at = std::time::Instant::now();
|
||||||
self.taffy
|
self.taffy
|
||||||
.compute_layout(id.into(), available_space.into())?;
|
.compute_layout(id.into(), available_space.into())?;
|
||||||
|
println!("compute_layout took {:?}", started_at.elapsed());
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue