github TanStack/db @tanstack/db@0.4.1

latest releases: @tanstack/svelte-db@0.1.23, @tanstack/solid-db@0.1.23, @tanstack/trailbase-db-collection@0.1.23...
11 hours ago

Patch Changes

  • Implement idle cleanup for collection garbage collection (#590)

    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.

    Key improvements:

    • Non-blocking cleanup operations that don't interfere with user interactions
    • Automatic fallback to setTimeout for older browsers without requestIdleCallback support
    • Proper callback management to prevent race conditions during cleanup rescheduling
    • Maintains full backward compatibility with existing collection lifecycle behavior

    This addresses performance concerns where collection cleanup could cause UI thread blocking during active application usage.

Don't miss a new db release

NewReleases is sending notifications on new releases.