Closed lbergnehr closed 4 years ago
I like the proposal on this issue. https://github.com/CoreyKaylor/Lightning.NET/issues/85
Regarding the UnmanagedMemoryStream I saw worse performance using it over the straight Marshal.Copy. That doesn't mean that a combination of the two possibly wouldn't get us to a better place. Again, happy to take a PR for this especially if it can demonstrably gain perf benefits.
https://github.com/dotnet/corefx/issues/18946
This API might provide what we need to achieve something of this nature.
Closing in favor of https://github.com/CoreyKaylor/Lightning.NET/issues/110
In order to avoid keeping large chunks of data in memory at the same time as well as making it easier to store really large objects, it would be nice to provide a
Stream
interface to reading and putting data to the database.Moreover, instead of copying the data with
Marshal.Copy
, would it be possible to use something like UnmanagedMemoryStream instead, avoiding copying the data at all?