TAMULib / weaver-components

Custom Web Components for the Weaver UI
MIT License
0 stars 1 forks source link

Issue 428: Weaver Components Memory and Performance Concerns. #429

Closed kaladay closed 3 years ago

kaladay commented 3 years ago

This is a quick fix for improving unsubscribe behavior. This is not a complete fix for #428 .

This does not bother with trying to determine a good name for the subscriptions.

This re-uses the existing shared subscription array, making appropriate changes to make this possible. A better design approach is preferred, but I consider this an acceptable quick fix.

Anywhere the shared store is not used and can be avoided, an ngOnDestroy() is called directly with the appropriate .unsubscribe(); call.

These changes appear to significantly reduce the impact of the problem. I do not believe these changes alone solve the problem. I believe this design approach can be greatly improved upon.