-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize performance by minimizing number of subscriptions and parall…
…el fetches Supabase realtime has an undocumented limitation that the subscription channel name must be unique. supabase/realtime#271 It is very badly documented, but the channel name can actually be any string. So we can fix this by using the store name for the subscription channel. Fixing this resulted in more distinct subscriptions, so I had to put some effort into reducing this number back down to the minimum. If a store is already subscribed, we don't have to subscribe again. This was especially important for the abteilungen store, which is re-subscribed every time the group scores change (I think because of the group ranking). Also, force reloading should still not cause overlapping duplicate requests. The forceReload flag should just affect the case when there is already data present in the store.
- Loading branch information
1 parent
728ed74
commit 770d3c5
Showing
6 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters