Saving a
lett1=new KdTree<float, Alrm>(1,new DoubleMath());
t1.SaveToFile(@"D:\alarms\alarmIndex.bin")
Gives the following error with about 7M entries:
System.Runtime.Serialization.SerializationException: The internal array cannot expand to greater than Int32.MaxValue elements.
at System.Runtime.Serialization.ObjectIDGenerator.Rehash()
at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime)
However this worked for both saving and loading:
letser= MBrace.FsPickler.BinarySerializer()
ser.Serialize(IO.File.Create @"D:\alarms\alarmIndex.bin", t1)lett2:KdTree<float,Alrm>= ser.Deserialize(IO.File.OpenRead @"D:\alarms\alarmIndex.bin")
Maybe you can switch to FsPickler internally for serialization
Saving a
Gives the following error with about 7M entries:
System.Runtime.Serialization.SerializationException: The internal array cannot expand to greater than Int32.MaxValue elements.
at System.Runtime.Serialization.ObjectIDGenerator.Rehash()
at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime)
However this worked for both saving and loading:
Maybe you can switch to FsPickler internally for serialization