fix: prevent subscription accumulation#320
Open
SamuelCox wants to merge 1 commit intobenfl3713:masterfrom
Open
fix: prevent subscription accumulation#320SamuelCox wants to merge 1 commit intobenfl3713:masterfrom
SamuelCox wants to merge 1 commit intobenfl3713:masterfrom
Conversation
✅ Deploy Preview for leddepartureboardcom ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ben-fletcher
approved these changes
Jan 7, 2026
Collaborator
ben-fletcher
left a comment
There was a problem hiding this comment.
Awesome work! Looks good to me ✅
Would of taken me quite a while to track this down.
benfl3713
approved these changes
Jan 7, 2026
Owner
|
I think you may have some issues with merging due to a bug in my GitHub actions. Let me know when you're happy to merge though and I can override it for you |
Author
|
Cheers, will do. It definitely seems better than it was but I think there might be another subscription leak or similar issue somewhere that I'm trying to track down. Also need to test I haven't broken firebase functionality as haven't got around to that yet, will let you know! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hopefully fixes #300
It's been years since I've worked in angular/rxJS so take all of this with a grain of salt, so I kind of went with my gut feel and still need to test when I find some time. But, loosely:
We push to subscriptions inside of some nested subcription.subscribe calls. I think that will over time accumulate more and more subscriptions, and eventually out of memory or something like that. That would be consistent with the behaviour I've seen.
The combination of switchMap and combineLatest should fix this, but I'll leave this as a draft PR until I've tested