FlatMap doesn't preserve order but works concurrently. ConcatMap does preserve order but doesn't work concurrently. For our current application dropping the concurrency using ConcatMap seems to be an ok solution, since we only want to return our results when we have them all. This still loses us some performance though!
The root of needing this concurrency in the first place is having to call the backend multiple times for each item in a reaction or vlog list (getting the user etc). This should be solved using the backend. See #155.
This behaviour is also the cause of issue #113, which was thought to be fixed but will now be fixed completely.
FlatMap
doesn't preserve order but works concurrently.ConcatMap
does preserve order but doesn't work concurrently. For our current application dropping the concurrency usingConcatMap
seems to be an ok solution, since we only want to return our results when we have them all. This still loses us some performance though!The root of needing this concurrency in the first place is having to call the backend multiple times for each item in a reaction or vlog list (getting the user etc). This should be solved using the backend. See #155.
This behaviour is also the cause of issue #113, which was thought to be fixed but will now be fixed completely.