improve performance and disable parallelism by default

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

View file

@ -241,12 +241,13 @@ let get_child_view = {
use dioxus_native_core::exports::shipyard::{IntoWorkloadSystem, Get, AddComponent};
use dioxus_native_core::tree::TreeRef;
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| {
let (#(#split_views,)*) = data;
let (tree, types, _, _, _) = &run_view;
let tree = tree.clone();
let node_mask = Self::NODE_MASK.build();
let node_types = types.clone();
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));

View file

@ -28,10 +28,9 @@ hashbrown = { version = "0.13.2", features = ["raw"] }
lightningcss = "1.0.0-alpha.39"
rayon = "1.6.1"
shipyard = "0.6.2"
shipyard = { version = "0.6.2", features = ["proc", "std"], default-features = false }
shipyard_hierarchy = "0.6.0"
[dev-dependencies]
rand = "0.8.5"
dioxus = { path = "../dioxus", version = "^0.3.0" }
@ -42,3 +41,4 @@ dioxus-native-core-macro = { path = "../native-core-macro" }
[features]
default = []
dioxus = ["dioxus-core"]
parallel = ["shipyard/parallel"]

View file

@ -30,7 +30,7 @@ smallvec = "1.6"
rustc-hash = "1.1.0"
anymap = "1.0.0-beta.2"
futures-channel = "0.3.25"
shipyard = "0.6.2"
shipyard = { version = "0.6.2", features = ["proc", "std"], default-features = false }
[dev-dependencies]
dioxus = { path = "../dioxus" }