-
Notifications
You must be signed in to change notification settings - Fork 826
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
Zero-copy binary reading from the reader's buffer #1712
Comments
Some notes:
|
Looking at this again as part of triage with @roji. Some more comments:
Finally, we could optionally:
|
We have streams filling this need IMO. Additionally if we want a more direct translation we'll have to wait until ref struct types can be used as generic arguments. @roji let me know what you want to do with this issue. |
There's still the more extreme version of providing access to Npgsql's internal buffer (zero copy), with all the lifecycle trouble that would entail. Otherwise I agree that this would basically be sugar over the user getting a stream and calling the methods there; and given that NpgsqlDataReader already has a very loaded public API surface, I'd avoid adding non-essential sugar there. Maybe keep this open to have the zero-copy variant somewhere on our radar? |
Right, if we'd expose ROSeq as an alternative to Stream we would be able to satisfy that. |
Yep |
With the new Span introduced in C# 7.2, we should support it for PostgreSQL bytea.
The text was updated successfully, but these errors were encountered: