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
I'm using RxJS 7, and I would like to have a child generator (another Observable) emitting values based on the parent data.
Constraints:
Emitted values from the Parent needs to be available to child generator;
Parent needs to know when child flow is done;
Child Observable can have many operators;
Efficient!
I was already able to achieve this, in two different implementations, but I believe I'm not using here the full potential RxJS has.
The reason I'm looking for a more efficient implementation is because it's intended for a data intensive system which can have millions of items flowing, so every save in CPU usage and time has a massive impact :)
Implementation 1:
It's not efficient because it needs to build a new RxJS pipeline for every parent item, which can be expensive in my system where we can have a good number of "steps", also the "pipeline builder" does more than just call RxJS, it also has some logging structure to create and all that.
Implementation 2:
The child pipeline is reused, but the efficiency is even worst when I do some benchmarking because of all the manipulations we are doing with the groupBy, reduce and zip.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using RxJS 7, and I would like to have a child generator (another Observable) emitting values based on the parent data.
Constraints:
I was already able to achieve this, in two different implementations, but I believe I'm not using here the full potential RxJS has.
The reason I'm looking for a more efficient implementation is because it's intended for a data intensive system which can have millions of items flowing, so every save in CPU usage and time has a massive impact :)
Implementation 1:
It's not efficient because it needs to build a new RxJS pipeline for every parent item, which can be expensive in my system where we can have a good number of "steps", also the "pipeline builder" does more than just call RxJS, it also has some logging structure to create and all that.
Implementation 2:
The child pipeline is reused, but the efficiency is even worst when I do some benchmarking because of all the manipulations we are doing with the
groupBy
,reduce
andzip
.My question is:
Can I have the FIRST implementation reuse the pipeline somehow and just change the
from
behavior for each Parent Item received?Beta Was this translation helpful? Give feedback.
All reactions