Index: wp-includes/class-wp-dependencies.php
===================================================================
--- wp-includes/class-wp-dependencies.php	(revision 57000)
+++ wp-includes/class-wp-dependencies.php	(working copy)
@@ -245,6 +245,12 @@
 	public function do_items( $handles = false, $group = false ) {
 		$handles = false === $handles ? $this->queue : (array) $handles;
 		$this->all_deps( $handles );
+
+		// Optimize script loading order for performance while maintaining dependencies
+		if ( $this instanceof WP_Scripts ) {
+			$this->optimize_loading_order();
+		}
+
 		foreach ( $this->to_do as $key => $handle ) {
 			if ( ! in_array( $handle, $this->done, true ) && isset( $this->registered[ $handle ] ) ) {
 				if ( $this->do_item( $handle, $group ) ) {
Index: wp-includes/class-wp-scripts.php
===================================================================
--- wp-includes/class-wp-scripts.php	(revision 57000)
+++ wp-includes/class-wp-scripts.php	(working copy)
@@ -15,6 +15,13 @@
 	public $base_url;
 
 	/**
+	 * Whether script loading order optimization is enabled.
+	 *
+	 * @since 6.8.0
+	 */
+	private $optimize_loading_order_enabled = true;
+
+	/**
 	 * @var string
 	 */
 	public $content_url;
@@ -548,4 +555,134 @@
 
 		return $eligible_strategy;
 	}
+
+	/**
+	 * Optimizes script loading order to reduce parser blocking time.
+	 *
+	 * Reorders scripts so that async and defer scripts are processed first,
+	 * allowing them to download in parallel while blocking scripts execute,
+	 * thereby reducing DOMContentLoaded timing.
+	 *
+	 * @since 6.8.0
+	 */
+	private function optimize_loading_order() {
+		if ( ! $this->optimize_loading_order_enabled || empty( $this->to_do ) ) {
+			return;
+		}
+
+		$start_time = microtime( true );
+		$original_order = $this->to_do;
+
+		// Group scripts by loading priority
+		$script_priorities = array();
+		$dependency_map = array();
+
+		// Build dependency map and calculate priorities
+		foreach ( $this->to_do as $handle ) {
+			if ( isset( $this->registered[ $handle ] ) ) {
+				$script = $this->registered[ $handle ];
+				$strategy = $this->get_eligible_loading_strategy( $handle, 'blocking' );
+				$priority = $this->calculate_loading_priority( $handle, $strategy );
+
+				$script_priorities[ $handle ] = $priority;
+				$dependency_map[ $handle ] = $script->deps ?? array();
+			}
+		}
+
+		// Sort scripts by priority while maintaining dependency order
+		$optimized_order = $this->sort_with_dependencies( $script_priorities, $dependency_map );
+
+		// Update the to_do array with optimized order
+		$this->to_do = array_values( $optimized_order );
+
+		// Performance monitoring hook
+		if ( function_exists( 'do_action' ) ) {
+			$end_time = microtime( true );
+			do_action( 'wp_script_optimization_complete', array(
+				'execution_time' => $end_time - $start_time,
+				'scripts_processed' => count( $original_order ),
+				'original_order' => $original_order,
+				'optimized_order' => $this->to_do,
+			) );
+		}
+	}
+
+	/**
+	 * Calculates loading priority for a script based on its strategy and characteristics.
+	 *
+	 * Lower numbers = higher priority (loaded first)
+	 * Priority order: async (1) -> defer (2) -> no-deps blocking (3) -> deps blocking (4)
+	 *
+	 * @since 6.8.0
+	 *
+	 * @param string $handle   Script handle.
+	 * @param string $strategy Loading strategy ('async', 'defer', or 'blocking').
+	 * @return int Loading priority.
+	 */
+	private function calculate_loading_priority( $handle, $strategy ) {
+		switch ( $strategy ) {
+			case 'async':
+				return 1; // Highest priority - non-blocking, can load immediately
+
+			case 'defer':
+				return 2; // Second priority - non-blocking but ordered
+
+			case 'blocking':
+			default:
+				// Blocking scripts get lower priority, but consider dependencies
+				$script = $this->registered[ $handle ];
+				$has_deps = ! empty( $script->deps );
+				$has_inline = ! empty( $script->extra['after'] ) || ! empty( $script->extra['before'] );
+
+				if ( $has_deps || $has_inline ) {
+					return 4; // Lowest priority - blocking with dependencies/inline scripts
+				}
+
+				return 3; // Low priority - simple blocking scripts
+		}
+	}
+
+	/**
+	 * Sorts scripts by priority while maintaining dependency order.
+	 *
+	 * Uses topological sorting to ensure dependencies are processed before
+	 * their dependents, while optimizing for loading performance.
+	 *
+	 * @since 6.8.0
+	 *
+	 * @param array $priorities    Script priorities keyed by handle.
+	 * @param array $dependencies  Dependency map keyed by handle.
+	 * @return array Optimized script order.
+	 */
+	private function sort_with_dependencies( $priorities, $dependencies ) {
+		$sorted = array();
+		$visited = array();
+		$visiting = array();
+
+		// Group scripts by priority
+		$priority_groups = array();
+		foreach ( $priorities as $handle => $priority ) {
+			$priority_groups[ $priority ][] = $handle;
+		}
+
+		// Sort each priority group while respecting dependencies
+		ksort( $priority_groups );
+		foreach ( $priority_groups as $priority => $handles ) {
+			foreach ( $handles as $handle ) {
+				$this->topological_sort_visit( $handle, $dependencies, $visited, $visiting, $sorted );
+			}
+		}
+
+		return $sorted;
+	}
+
+	/**
+	 * Performs topological sort visit for dependency resolution.
+	 *
+	 * @since 6.8.0
+	 *
+	 * @param string $handle       Current script handle.
+	 * @param array  $dependencies Dependency map.
+	 * @param array  &$visited     Visited handles.
+	 * @param array  &$visiting    Currently visiting handles (cycle detection).
+	 * @param array  &$sorted      Sorted result array.
+	 */
+	private function topological_sort_visit( $handle, $dependencies, &$visited, &$visiting, &$sorted ) {
+		if ( isset( $visiting[ $handle ] ) ) {
+			// Circular dependency detected - maintain original order
+			return;
+		}
+
+		if ( isset( $visited[ $handle ] ) ) {
+			return;
+		}
+
+		$visiting[ $handle ] = true;
+
+		// Visit dependencies first
+		if ( isset( $dependencies[ $handle ] ) ) {
+			foreach ( $dependencies[ $handle ] as $dep ) {
+				// Visit dependency if it exists in our registered scripts or dependencies
+				if ( isset( $dependencies[ $dep ] ) || isset( $this->registered[ $dep ] ) ) {
+					$this->topological_sort_visit( $dep, $dependencies, $visited, $visiting, $sorted );
+				}
+			}
+		}
+
+		unset( $visiting[ $handle ] );
+		$visited[ $handle ] = true;
+		$sorted[] = $handle;
+	}
+
+	/**
+	 * Disables script loading order optimization.
+	 *
+	 * @since 6.8.0
+	 */
+	public function disable_loading_order_optimization() {
+		$this->optimize_loading_order_enabled = false;
+	}
+
+	/**
+	 * Enables script loading order optimization.
+	 *
+	 * @since 6.8.0
+	 */
+	public function enable_loading_order_optimization() {
+		$this->optimize_loading_order_enabled = true;
+	}
 }