Yes but if I add this line is do again check in whole list ?
Vivek Modi
06/09/2022, 3:26 PM
So does it impact on performance?
e
Erick Sumargo
06/09/2022, 3:31 PM
I think you always need to filter those null value manually because it came from the data source (I suppose?).
Also if you concern with the performance, perhaps you can move the filter computation to other dispatcher first. Something like this:
I would be interested in how this turns out.
My guess is that adding flowOn() actually takes longer (in terms of CPU time used on main thread)
due to the overhead of having to dispatch in and out of another thread each time vs simply comparing for nulls
It would depend on how big topicList is. My 'guess' is that it would take a list > several 1000's long before it was
less time (cpu time used in main thread) to switch threads and back vs filtering inline .