mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-11 15:07:08 +00:00
chore: add back template diffing
This commit is contained in:
parent
7e45f2aa04
commit
b659f4d5d6
2 changed files with 7 additions and 10 deletions
|
@ -228,7 +228,6 @@ impl<'b> VirtualDom {
|
|||
self.run_scope(scope_id);
|
||||
self.diff_scope(scope_id);
|
||||
|
||||
println!("diffed component scope {:?}", scope_id);
|
||||
self.dirty_scopes.remove(&DirtyScope {
|
||||
height: self.scopes[scope_id.0].height,
|
||||
id: scope_id,
|
||||
|
@ -273,14 +272,13 @@ impl<'b> VirtualDom {
|
|||
/// }
|
||||
/// ```
|
||||
fn light_diff_templates(&mut self, left: &'b VNode<'b>, right: &'b VNode<'b>) {
|
||||
self.replace(left, right)
|
||||
// match matching_components(left, right) {
|
||||
// None => self.replace(left, right),
|
||||
// Some(components) => components
|
||||
// .into_iter()
|
||||
// .enumerate()
|
||||
// .for_each(|(idx, (l, r))| self.diff_vcomponent(l, r, right, idx)),
|
||||
// }
|
||||
match matching_components(left, right) {
|
||||
None => self.replace(left, right),
|
||||
Some(components) => components
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.for_each(|(idx, (l, r))| self.diff_vcomponent(l, r, right, idx)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Diff the two text nodes
|
||||
|
|
|
@ -238,7 +238,6 @@ impl<'src> ScopeState {
|
|||
pub fn schedule_update_any(&self) -> Arc<dyn Fn(ScopeId) + Send + Sync> {
|
||||
let chan = self.tasks.sender.clone();
|
||||
Arc::new(move |id| {
|
||||
println!("Scheduling update for {:?}", id);
|
||||
chan.unbounded_send(SchedulerMsg::Immediate(id)).unwrap();
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue