You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to serialize a large object, setting preserveObjectReferences to true causes the serialization to hang indefinitely.
I've only noticed this behavior with large objects.
I guess its perfectly fine to turn off that option, but thought I'd report it anyway as it seems strange.
Reproducible in both Wire and Hyperion and on .NET Core 2.1 and .NET Framework 4.6
static void Main(string[] args)
{
Hyperion.Serializer s = new Hyperion.Serializer(new Hyperion.SerializerOptions(preserveObjectReferences:true));
var obj = new List<Dictionary<string, object>>();
for (var i = 0; i < 1000000;i++)
{
var item = new Dictionary<string, object>();
item["x"] = i;
item["y"] = DateTime.Now;
obj.Add(item);
}
var dict = new Dictionary<string, object>();
dict["key"] = obj;
using (var ms = new System.IO.MemoryStream())
{
s.Serialize(dict, ms);
Console.WriteLine("Serialized Size: {0}", ms.Length);
}
}
The text was updated successfully, but these errors were encountered:
When trying to serialize a large object, setting preserveObjectReferences to true causes the serialization to hang indefinitely.
I've only noticed this behavior with large objects.
I guess its perfectly fine to turn off that option, but thought I'd report it anyway as it seems strange.
Reproducible in both Wire and Hyperion and on .NET Core 2.1 and .NET Framework 4.6
The text was updated successfully, but these errors were encountered: