Log frame timings
This commit is contained in:
parent
1e4a7e6ef1
commit
c863227dc2
3 changed files with 13 additions and 1 deletions
|
@ -209,8 +209,14 @@ impl AnyView {
|
|||
) {
|
||||
cx.with_absolute_element_offset(origin, |cx| {
|
||||
let (layout_id, rendered_element) = (self.layout)(self, cx);
|
||||
let start_time = std::time::Instant::now();
|
||||
cx.compute_layout(layout_id, available_space);
|
||||
let duration = start_time.elapsed();
|
||||
println!("compute layout: {:?}", duration);
|
||||
let start_time = std::time::Instant::now();
|
||||
(self.paint)(self, rendered_element, cx);
|
||||
let duration = start_time.elapsed();
|
||||
println!("paint: {:?}", duration);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue