Closed ab-tools closed 8 years ago
Hi, Andreas! I checked your issue.
Hello,
first thanks a lot for your very quick reply!
I just build this small example project now to reproduce it more easily without my database: http://www.ab-tools.com/temp/AqlaSerializerTest.zip
It works fine if you reduce the node count to e. g. only 1000, but with 10000 you get the StackOverflowException. So it obviously works fine also with recursion as long as not too many objects are involved.
Best regards and again thanks for the quick response Andreas
@ab-tools
There is a workaround but you need to change your structure: remove Waypoint.Airports from serialization but add Dictionary of Waypoint, Airport[] somewhere in the root instead so there will be no more "Waypoints => Airports" part.
Yes, I know - that's how I do it with protobuf-net right now (and then iterating through all Airways at program start and adding the Waypoint => Airways references manually again), but I really would like to get rid of all these work-arounds.
I guess I would need less work-arounds than with protobuf-net with your serializer already (due to the reference issue to be fixed), but it would be great to have a serialization solution that just can handle a graph structure correctly without any work-arounds. ;-)
You marked it for V2: when you expect to have a first version of V2 to be usable?
Agains thanks for the very quick replies! Andreas
V2 is a "big bright future". I plan to rewrite core things but it's really big task and is not going to happen soon. I wouldn't wait for that :)
OK, see - that's bad.
But anyway, AqlaSerializer seems to be the best serializer right now as protobuf-net obviously is dead.
So I'll probably switch to your solution for this project. :-)
Thanks again for this great support Andreas
@ab-tools I have another workaround for you. Just create a separate thread with big stack size.
new Thread(s => Serialize(), 1024 * 1024 * 50).Start();
Download the newest release otherwise you'll get recursion exception.
That's a good idea, thanks for this suggestion!
I just gave it a try: you need to do the same for deserialization, too, of course, but then it works fine. The application does require full trust then though (for changing the stack size of the new thread), but as my application should not be run over network or similar, I think that's OK (although I need to test a bit more with it as I never needed to change the stack size of a thread till now ;-) ).
I will add a suggestion/feature request in another issue now, but again thanks for your great support regarding this issue here Andreas
As written in the protobuf-net project already, I can reproduce an exception when trying to serialize a bigger (about 50 MB) graph object with AqlaSerializer.
To reproduce it I need to include several classes from my project which I don't want to publish here. Therefore I allowed myself to send you an e-mail to the address I found on your "Aqla Solutions" website.
Please just start this example project, click on "Load Data With Protobuf" and after it's done, click on "Save Data With AqlaSerializer" => Exception.
I really would like to get rid of Protobuf as this project seems to be dead. So I'm very much looking forward to your reply!
Thanks in advance Andreas