Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vectorBuilder does not stream data #189

Open
axman6 opened this issue Mar 25, 2020 · 2 comments
Open

vectorBuilder does not stream data #189

axman6 opened this issue Mar 25, 2020 · 2 comments

Comments

@axman6
Copy link

axman6 commented Mar 25, 2020

I received a PR recently which used vectorBuilder to produce ByteStrings (via conversion from unboxed vectors). I was surprised when I looked at the source code that it does not produce vectors lazily, and instead produces the list of vectors and yields them all once the conduit has finished. Is this expected behaviour? It's certainly surprising to me given its type!

@snoyberg
Copy link
Owner

It's honestly been so long since I wrote this that I don't remember. From the code and comments, it looks like it's designed to handle a very specific kind of inefficiency we were running into at the time, and may in fact not stream the output as you're anticipating.

@axman6
Copy link
Author

axman6 commented Mar 30, 2020

It looks like I'm probably wrong about the behaviour of the function, I'd missed how yieldS interacted with onAwait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants