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
After studying for a while of your lib's code one thought crossed my mind: if there any opportunity to organize a method like
@override
dispose() {
// TODO
// kill any process
}
inside which I would have a possibility to kill any processes I've already run inside my Backend class (which instantiated from your Backend class), and this method would be run upon my Backend class had disposed/dismounted.
Justification: lets assume I use a Backend to do some expensive operations upon every event's tick from Web Sockets and it occur from 1 to 100 times per second while I need to have an accumulated result once per 250 ms and therefore I have to use a throttling method to reduce the number of operations to 4 per second in order not to overload my Frontend class which most definitely works on the app's main isolate. For that I use a package throttling which requires a dispose method to close/kill the timer for the purpose not to leak a RAM. This in turn would unload main isolate and made our life much easier and our apps more performant.
With this in mind, could your please give me any clue on how to implement this by existing means of your lib or, if it is possible, to upgrade your quite a sophisticated lib in order to have such an instrument?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
If you are using the throtling on the beckend side, when the beckend closes, everything closes, even the "timer" set for the throttle. It is like a force close basically of everything that is running in that backend(isolate)
Hello, @alphamikle!
After studying for a while of your lib's code one thought crossed my mind: if there any opportunity to organize a method like
inside which I would have a possibility to kill any processes I've already run inside my Backend class (which instantiated from your Backend class), and this method would be run upon my Backend class had disposed/dismounted.
Justification: lets assume I use a Backend to do some expensive operations upon every event's tick from Web Sockets and it occur from 1 to 100 times per second while I need to have an accumulated result once per 250 ms and therefore I have to use a throttling method to reduce the number of operations to 4 per second in order not to overload my Frontend class which most definitely works on the app's main isolate. For that I use a package throttling which requires a dispose method to close/kill the timer for the purpose not to leak a RAM. This in turn would unload main isolate and made our life much easier and our apps more performant.
With this in mind, could your please give me any clue on how to implement this by existing means of your lib or, if it is possible, to upgrade your quite a sophisticated lib in order to have such an instrument?
Thanks in advance.
The text was updated successfully, but these errors were encountered: