From 47e46de74f8504f244fc301a92449d27606ff5f0 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Tue, 16 Jan 2024 18:08:22 -0800 Subject: [PATCH] remove subtree file --- packages/core/src/subtree.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 packages/core/src/subtree.rs diff --git a/packages/core/src/subtree.rs b/packages/core/src/subtree.rs deleted file mode 100644 index 57d09efe2..000000000 --- a/packages/core/src/subtree.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* -This is a WIP module - -Subtrees allow the virtualdom to split up the mutation stream into smaller chunks which can be directed to different parts of the dom. -It's core to implementing multiwindow desktop support, portals, and alternative inline renderers like react-three-fiber. - -The primary idea is to give each renderer a linear element tree managed by Dioxus to maximize performance and minimize memory usage. -This can't be done if two renderers need to share the same native tree. -With subtrees, we have an entirely different slab of elements - -*/ - -use std::borrow::Cow; - -use slab::Slab; - -use crate::{ElementPath, ScopeId}; - -/// A collection of elements confined to a single scope under a chunk of the tree -/// -/// All elements in this collection are guaranteed to be in the same scope and share the same numbering -/// -/// This unit can be multithreaded -/// Whenever multiple subtrees are present, we can perform **parallel diffing** -pub struct Subtree { - id: usize, - namespace: Cow<'static, str>, - root: ScopeId, - elements: Slab, -}