You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement idle cleanup for collection garbage collection
6
+
7
+
Collection cleanup operations now use `requestIdleCallback()` to prevent blocking the UI thread during garbage collection. This improvement ensures better performance by scheduling cleanup during browser idle time rather than immediately when collections have no active subscribers.
8
+
9
+
**Key improvements:**
10
+
11
+
- Non-blocking cleanup operations that don't interfere with user interactions
12
+
- Automatic fallback to `setTimeout` for older browsers without `requestIdleCallback` support
13
+
- Proper callback management to prevent race conditions during cleanup rescheduling
14
+
- Maintains full backward compatibility with existing collection lifecycle behavior
15
+
16
+
This addresses performance concerns where collection cleanup could cause UI thread blocking during active application usage.
0 commit comments