change to no longer parallel for edges (#6705)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
@ -337,18 +337,6 @@ pub(crate) async fn do_post_extrude<'a>(
 | 
			
		||||
        let next_adjacent_edge_uuid = exec_state.next_uuid();
 | 
			
		||||
        let get_all_edge_faces_opposite_uuid = exec_state.next_uuid();
 | 
			
		||||
        let get_all_edge_faces_next_uuid = exec_state.next_uuid();
 | 
			
		||||
        #[cfg(any(not(test), not(feature = "artifact-graph"), not(target_arch = "wasm32")))]
 | 
			
		||||
        #[allow(unused_variables)]
 | 
			
		||||
        let single_threaded = false;
 | 
			
		||||
        // When running in vitest, we need to run this in a single thread.
 | 
			
		||||
        // Because their workers are complete shit.
 | 
			
		||||
        #[cfg(target_arch = "wasm32")]
 | 
			
		||||
        let single_threaded = crate::wasm::vitest::running_in_vitest();
 | 
			
		||||
        // If we are running in a test, for the arifact graph to be deterministic and not fail
 | 
			
		||||
        // after say a fillet runs concurrently, we need to make sure that the
 | 
			
		||||
        // async tasks are done before we return.
 | 
			
		||||
        #[cfg(all(test, feature = "artifact-graph", not(target_arch = "wasm32")))]
 | 
			
		||||
        let single_threaded = true;
 | 
			
		||||
 | 
			
		||||
        // Get faces for original edge
 | 
			
		||||
        // Since this one is batched we can just run it.
 | 
			
		||||
@ -361,57 +349,27 @@ pub(crate) async fn do_post_extrude<'a>(
 | 
			
		||||
        )
 | 
			
		||||
        .await?;
 | 
			
		||||
 | 
			
		||||
        if !single_threaded {
 | 
			
		||||
            args.ctx
 | 
			
		||||
                .engine
 | 
			
		||||
                .async_tasks()
 | 
			
		||||
                .spawn(get_bg_edge_info_opposite(
 | 
			
		||||
                    args_cloned.clone(),
 | 
			
		||||
                    curve_id,
 | 
			
		||||
                    sketch.id,
 | 
			
		||||
                    face_id,
 | 
			
		||||
                    opposite_edge_uuid,
 | 
			
		||||
                    get_all_edge_faces_opposite_uuid,
 | 
			
		||||
                    single_threaded,
 | 
			
		||||
                ))
 | 
			
		||||
                .await;
 | 
			
		||||
        get_bg_edge_info_opposite(
 | 
			
		||||
            args_cloned.clone(),
 | 
			
		||||
            curve_id,
 | 
			
		||||
            sketch.id,
 | 
			
		||||
            face_id,
 | 
			
		||||
            opposite_edge_uuid,
 | 
			
		||||
            get_all_edge_faces_opposite_uuid,
 | 
			
		||||
            true,
 | 
			
		||||
        )
 | 
			
		||||
        .await?;
 | 
			
		||||
 | 
			
		||||
            args.ctx
 | 
			
		||||
                .engine
 | 
			
		||||
                .async_tasks()
 | 
			
		||||
                .spawn(get_bg_edge_info_next(
 | 
			
		||||
                    args_cloned,
 | 
			
		||||
                    curve_id,
 | 
			
		||||
                    sketch.id,
 | 
			
		||||
                    face_id,
 | 
			
		||||
                    next_adjacent_edge_uuid,
 | 
			
		||||
                    get_all_edge_faces_next_uuid,
 | 
			
		||||
                    single_threaded,
 | 
			
		||||
                ))
 | 
			
		||||
                .await;
 | 
			
		||||
        } else {
 | 
			
		||||
            get_bg_edge_info_opposite(
 | 
			
		||||
                args_cloned.clone(),
 | 
			
		||||
                curve_id,
 | 
			
		||||
                sketch.id,
 | 
			
		||||
                face_id,
 | 
			
		||||
                opposite_edge_uuid,
 | 
			
		||||
                get_all_edge_faces_opposite_uuid,
 | 
			
		||||
                single_threaded,
 | 
			
		||||
            )
 | 
			
		||||
            .await?;
 | 
			
		||||
 | 
			
		||||
            get_bg_edge_info_next(
 | 
			
		||||
                args_cloned,
 | 
			
		||||
                curve_id,
 | 
			
		||||
                sketch.id,
 | 
			
		||||
                face_id,
 | 
			
		||||
                next_adjacent_edge_uuid,
 | 
			
		||||
                get_all_edge_faces_next_uuid,
 | 
			
		||||
                single_threaded,
 | 
			
		||||
            )
 | 
			
		||||
            .await?;
 | 
			
		||||
        }
 | 
			
		||||
        get_bg_edge_info_next(
 | 
			
		||||
            args_cloned,
 | 
			
		||||
            curve_id,
 | 
			
		||||
            sketch.id,
 | 
			
		||||
            face_id,
 | 
			
		||||
            next_adjacent_edge_uuid,
 | 
			
		||||
            get_all_edge_faces_next_uuid,
 | 
			
		||||
            true,
 | 
			
		||||
        )
 | 
			
		||||
        .await?;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let Faces {
 | 
			
		||||
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB  | 
| 
		 Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB  | 
@ -608,7 +608,7 @@ flowchart LR
 | 
			
		||||
  83 --- 246
 | 
			
		||||
  83 --- 289
 | 
			
		||||
  90 --- 159
 | 
			
		||||
  90 x--> 192
 | 
			
		||||
  90 x--> 193
 | 
			
		||||
  90 --- 226
 | 
			
		||||
  90 --- 271
 | 
			
		||||
  104 --- 151
 | 
			
		||||
@ -910,7 +910,7 @@ flowchart LR
 | 
			
		||||
  211 <--x 191
 | 
			
		||||
  212 <--x 191
 | 
			
		||||
  213 <--x 191
 | 
			
		||||
  226 <--x 193
 | 
			
		||||
  226 <--x 192
 | 
			
		||||
  239 <--x 195
 | 
			
		||||
  240 <--x 195
 | 
			
		||||
  241 <--x 195
 | 
			
		||||
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB  | 
| 
		 Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB  | 
@ -709,7 +709,6 @@ flowchart LR
 | 
			
		||||
  115 --- 179
 | 
			
		||||
  115 x--> 228
 | 
			
		||||
  115 --- 256
 | 
			
		||||
  115 x--> 307
 | 
			
		||||
  115 --- 308
 | 
			
		||||
  164 <--x 116
 | 
			
		||||
  116 --- 184
 | 
			
		||||
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB  |