Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query store optimizations #6413

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

christianbaroni
Copy link
Member

@christianbaroni christianbaroni commented Jan 19, 2025

What changed (plus any additional context for devs)

  • Moves subscriptionCount out of the store state and into a lightweight SubscriptionManager class, which prevents stores with many subscribed selectors from slowing down due to the subscription management logic on subscribe/unsubscribe
    • The state changes that occur around subscription tracking are now fully isolated within the SubscriptionManager
  • Now ensuring consistent param ordering in getQueryKey
  • Makes the pruneCache function faster and improves CacheEntry type safety
  • Adds the ability to define enabled as a dynamic value, e.g.:
enabled: $ => $(useSwapsStore, state => !state.isSwapsOpen),

Screen recordings / screenshots

What to test

@christianbaroni christianbaroni added the performance performance related improvements label Jan 19, 2025
@brunobar79
Copy link
Member

Launch in simulator or device for 72a8382

@brunobar79
Copy link
Member

Launch in simulator or device for 10f5063

@brunobar79
Copy link
Member

Launch in simulator or device for 70ff8bd

@brunobar79
Copy link
Member

Launch in simulator or device for adff53c

@brunobar79
Copy link
Member

Launch in simulator or device for 8db068c

@brunobar79
Copy link
Member

Launch in simulator or device for 8db068c

@christianbaroni christianbaroni merged commit bc8126e into develop Jan 22, 2025
8 checks passed
@christianbaroni christianbaroni deleted the @christian/query-store-optimizations branch January 22, 2025 18:20
derHowie pushed a commit that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance performance related improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants