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

Add support for sending and recieving large json arrays. #4729

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nonwombatant
Copy link

@nonwombatant nonwombatant commented Jan 22, 2024

Supports large json arrays that may not fit in memory and cause out of memory exceptions.

Uses IAsyncEnumerable and a custom Http Content to send large json arrays.
Uses IAsyncEnumerator to recieve large json arrays.

By returning an IAsyncEnumerator it correctly handles memory safety and IDisposables.

Possible fix for
#4236 and #3909

Note: I'm like 95% confident about the implementation for reading large json arrays. I'm much less confident about the custom httpContent for sending large arrays being the best approach.

Uses IAsyncEnumerables and a custom Http Content to send large json arrays.
Uses IAsyncEnumerator to recieve large json arrays.
Correctly handles memory safety and IDisposables.
@Chaosflo
Copy link

Chaosflo commented Jun 6, 2024

@RicoSuter When will this be merged to support streaming?
I am desperately in need of this =/

@nonwombatant
Copy link
Author

@RicoSuter When will this be merged to support streaming? I am desperately in need of this =/

This seems unlikely to be merged, kind of a niche use case I think? There's some workarounds that are posted on the issue pages.

Happy to follow up on this though.

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

Successfully merging this pull request may close these issues.

None yet

2 participants