Hey all, I’m having some trouble understanding the downside of using buffer() on a flow before collecting it? Is there some reason not to use it? At first I thought it could change the order of values treatment but it doesn’t seem like it
Antoine Gagnon
03/11/2020, 7:47 PM
Well, I was able to answer my own question in the end! Buffer is only worth it for coroutines with high computation in the emit and collect parts. The creation of each Channel for very “fast” coroutines is not worth it and slows down the Flow!