@@ -379,13 +379,15 @@ function execute_signal_fn(signal) {
379
379
// If we have more than 16 elements in the array then use a Set for faster performance
380
380
// TODO: evaluate if we should always just use a Set or not here?
381
381
const full_current_dependencies_set =
382
- current_dep_length > 16 ? new Set ( full_current_dependencies ) : null ;
382
+ current_dep_length > 16 && deps_length - current_dependencies_index > 1
383
+ ? new Set ( full_current_dependencies )
384
+ : null ;
383
385
for ( i = current_dependencies_index ; i < deps_length ; i ++ ) {
384
386
const dependency = dependencies [ i ] ;
385
387
if (
386
- ( full_current_dependencies_set !== null &&
387
- ! full_current_dependencies_set . has ( dependency ) ) ||
388
- ! full_current_dependencies . includes ( dependency )
388
+ full_current_dependencies_set !== null
389
+ ? ! full_current_dependencies_set . has ( dependency )
390
+ : ! full_current_dependencies . includes ( dependency )
389
391
) {
390
392
remove_consumer ( signal , dependency ) ;
391
393
}
@@ -1084,7 +1086,7 @@ function mark_subtree_children_inert(signal, inert, visited_blocks) {
1084
1086
for ( i = 0 ; i < references . length ; i ++ ) {
1085
1087
const reference = references [ i ] ;
1086
1088
if ( ( reference . f & IS_EFFECT ) !== 0 ) {
1087
- mark_subtree_inert ( references [ i ] , inert , visited_blocks ) ;
1089
+ mark_subtree_inert ( reference , inert , visited_blocks ) ;
1088
1090
}
1089
1091
}
1090
1092
}
0 commit comments