improve performance and disable parallelism by default

This commit is contained in:
Evan Almloff committed 2023-03-12 18:06:40 -05:00
commit 40292e40b2
3 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -242,11 +242,12 @@ let get_child_view = {
use dioxus_native_core::tree::TreeRef; use dioxus_native_core::tree::TreeRef;
use dioxus_native_core::prelude::{NodeType, NodeView}; use dioxus_native_core::prelude::{NodeType, NodeView};
let node_mask = Self::NODE_MASK.build();
(move |data: #combined_dependencies_quote, run_view: dioxus_native_core::RunPassView #trait_generics| { (move |data: #combined_dependencies_quote, run_view: dioxus_native_core::RunPassView #trait_generics| {
let (#(#split_views,)*) = data; let (#(#split_views,)*) = data;
let (tree, types, _, _, _) = &run_view; let (tree, types, _, _, _) = &run_view;
let tree = tree.clone(); let tree = tree.clone();
let node_mask = Self::NODE_MASK.build();
let node_types = types.clone(); let node_types = types.clone();
dioxus_native_core::run_pass(type_id, dependants.clone(), pass_direction, run_view, |id, context| { dioxus_native_core::run_pass(type_id, dependants.clone(), pass_direction, run_view, |id, context| {
let node_data: &NodeType<_> = node_types.get(id).unwrap_or_else(|err| panic!("Failed to get node type {:?}", err)); let node_data: &NodeType<_> = node_types.get(id).unwrap_or_else(|err| panic!("Failed to get node type {:?}", err));
+2 -2
View File
@@ -28,10 +28,9 @@ hashbrown = { version = "0.13.2", features = ["raw"] }
lightningcss = "1.0.0-alpha.39" lightningcss = "1.0.0-alpha.39"
rayon = "1.6.1" rayon = "1.6.1"
shipyard = "0.6.2" shipyard = { version = "0.6.2", features = ["proc", "std"], default-features = false }
shipyard_hierarchy = "0.6.0" shipyard_hierarchy = "0.6.0"
[dev-dependencies] [dev-dependencies]
rand = "0.8.5" rand = "0.8.5"
dioxus = { path = "../dioxus", version = "^0.3.0" } dioxus = { path = "../dioxus", version = "^0.3.0" }
@@ -42,3 +41,4 @@ dioxus-native-core-macro = { path = "../native-core-macro" }
[features] [features]
default = [] default = []
dioxus = ["dioxus-core"] dioxus = ["dioxus-core"]
parallel = ["shipyard/parallel"]
+1 -1
View File
@@ -30,7 +30,7 @@ smallvec = "1.6"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
anymap = "1.0.0-beta.2" anymap = "1.0.0-beta.2"
futures-channel = "0.3.25" futures-channel = "0.3.25"
shipyard = "0.6.2" shipyard = { version = "0.6.2", features = ["proc", "std"], default-features = false }
[dev-dependencies] [dev-dependencies]
dioxus = { path = "../dioxus" } dioxus = { path = "../dioxus" }