@@ -6,7 +6,6 @@ use std::{
6
6
use once_cell:: sync:: OnceCell ;
7
7
use rayon:: iter:: { IntoParallelRefIterator , ParallelIterator } ;
8
8
use rspack_collections:: { IdentifierDashMap , IdentifierMap , IdentifierSet , UkeySet } ;
9
- use rspack_util:: fx_hash:: FxIndexSet ;
10
9
use rustc_hash:: FxHasher ;
11
10
12
11
use crate :: {
@@ -300,22 +299,24 @@ fn compute_affected_modules_with_chunk_graph(
300
299
) -> u64 {
301
300
let module_identifier = module. identifier ( ) ;
302
301
let mut hasher = FxHasher :: default ( ) ;
303
- chunk_graph
302
+ compilation
303
+ . chunk_graph
304
304
. get_module_id ( module_identifier)
305
305
. hash ( & mut hasher) ;
306
306
ModuleGraph :: is_async ( compilation, & module_identifier) . hash ( & mut hasher) ;
307
- let module_ids : FxIndexSet < _ > = module_graph
307
+ for module_id in module_graph
308
308
. get_ordered_connections ( & module_identifier)
309
309
. expect ( "should have module" )
310
310
. into_iter ( )
311
311
. filter_map ( |dep_id| {
312
312
let connection = module_graph
313
313
. connection_by_dependency_id ( dep_id)
314
314
. expect ( "should have connection" ) ;
315
- chunk_graph. get_module_id ( * connection. module_identifier ( ) )
315
+ compilation
316
+ . chunk_graph
317
+ . get_module_id ( * connection. module_identifier ( ) )
316
318
} )
317
- . collect ( ) ;
318
- for module_id in module_ids {
319
+ {
319
320
module_id. hash ( & mut hasher) ;
320
321
}
321
322
for block_id in module. get_blocks ( ) {
@@ -341,7 +342,7 @@ fn compute_affected_modules_with_chunk_graph(
341
342
342
343
let module_graph = compilation. get_module_graph ( ) ;
343
344
let affected_modules: IdentifierMap < u64 > = cache
344
- . iter ( )
345
+ . par_iter ( )
345
346
. filter_map ( |item| {
346
347
let ( module_identifier, & old_invalidate_key) = item. pair ( ) ;
347
348
let module = module_graph
0 commit comments