Skip to content

Commit

Permalink
perf: exit edge case condition early in propagate if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jan 10, 2025
1 parent c6b441d commit 2233d45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ export function propagate(link: Link): void {
&& (sub.flags = subFlags | targetFlag, true)
)
|| (
(subFlags & (SubscriberFlags.Tracking | SubscriberFlags.Recursed)) === SubscriberFlags.Recursed
(subFlags & SubscriberFlags.Recursed)
&& !(subFlags & SubscriberFlags.Tracking)
&& (sub.flags = (subFlags & ~SubscriberFlags.Recursed) | targetFlag, true)
)
|| (
Expand Down

0 comments on commit 2233d45

Please sign in to comment.