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
Describe the bug
Swapsteem code uses RxJS to subscribe to changes in data. RxJS in-turn use Observable which are Infinite Subscriptions. This means that the code will execute even without a subscribe being called unlike http.get where call will only be made when you subscribe to it. This causes a performance and memory hog as you exit and re-enter a controller because you are subscribing to same service multiple times. You can find more details in the stack overflow discussion here: https://stackoverflow.com/a/41177163/1141542
To Reproduce
This problem can be observed in dozens of places throughout the code. Below is a discussion on one such scenario and a fix for the same.
Cool hunt! Thank you for letting us know about this. We have not been doing code based on performance till now, but this hunt will make us focus on that aspect. We accept it as a valid contribution and will fix ASAP.
Thanks again!
Describe the bug
Swapsteem code uses RxJS to subscribe to changes in data. RxJS in-turn use Observable which are Infinite Subscriptions. This means that the code will execute even without a subscribe being called unlike http.get where call will only be made when you subscribe to it. This causes a performance and memory hog as you exit and re-enter a controller because you are subscribing to same service multiple times. You can find more details in the stack overflow discussion here: https://stackoverflow.com/a/41177163/1141542
To Reproduce
This problem can be observed in dozens of places throughout the code. Below is a discussion on one such scenario and a fix for the same.
terms-and-conditions.component.ts
Expected behavior
Above code can be re-written as.
When controller destroys set isAlive to false
The text was updated successfully, but these errors were encountered: