metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Leet (JIRA)" <>
Subject [jira] [Updated] (METRON-1790) Unsubscribe from every observable in the pcap panel UI component
Date Tue, 11 Dec 2018 16:05:00 GMT


Justin Leet updated METRON-1790:
    Fix Version/s: 0.7.0

> Unsubscribe from every observable in the pcap panel UI component
> ----------------------------------------------------------------
>                 Key: METRON-1790
>                 URL:
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Tamas Fodor
>            Assignee: Tamas Fodor
>            Priority: Minor
>             Fix For: 0.7.0
> There are a lot of http requests performed in the pcap panel ui component and we just
unsubscribe from some of them when the component is no longer rendered on the screen. It could
cause memory consumption issues. Because of the active subscriptions, the garbage collector
is not able to remove these objects from the memory, however they're not needed to be there
> There's another benefit of unsubscribing from these http calls. If the user leaves the
pcap tab but there are pending requests, the unsubscribe method cancels the active xhrs immediately
so it won't wait for fulfilment unnecessarily.
> []
> I would also refactor that part when we convert an observable to a promise. I would keep
it as an observable. By doing this, we would be able to unsubscribe from it as well in the
destructor method. Promises are not cancelable.
> []
> Resources:
> []
> This is the place to free resources that won't be garbage collected automatically. Unsubscribe
from Observables and DOM events. Stop interval timers.

This message was sent by Atlassian JIRA

View raw message