Closed jbparker closed 7 years ago
@jbparker I don't really think I want this library/use-case in CacheManager because
a) The use-case is pretty small.
b) I believe that serializing a DataTable
or similar directly is a bad idea and should be implemented differently (cache only the data you actually need and create custom contracts for those => easy to serialize).
c) It would have to be another CacheManager Nuget (as I don't want to have a reference to it in the current protobuf Nuget). And there is quite some work to be done to maintain, test and release that.
That being said, you can always create your own library which does use that library, or, simply serialize your datatable outside of CacheManager and then cache the resulting byte array...
What do you think?
Agreed! Especially agree with b) - most of these are legacy application utilizations that shouldn't be used go forward but that are, unfortunately, quite prevalent in our application.
Because of this, I'm good leaving this off - just wanted to check. Thanks for your time!
Currently, if using
ProtoBufSerializer
for persistent serialization, the only option for serializingSystem.Data.DataTable
andSystem.Data.DataSet
is usingBinarySerializer
.For large
DataTable
&DataSet
objects, this does not serialize well and typically throws anOutOfMemoryException
for non-trivially sized collections.I am currently employing a custom serializer that uses Protocol Buffers DataReader Extensions for .NET to serialize
DataTable
andDataSet
(along with gzip support mentioned on #173).@MichaCo Same on this issue - would this be desirable to have in the mainline source?