Click to See Complete Forum and Search --> : Serialization problem


PeterSteph
December 18th, 2003, 05:11 AM
Hi all

I try to serialize an ArrayList containing a lot of simple objects to a file. When the ArrayList has 20.000 elements the serialization works (but is VERY slow) and I can deserialize fast and without problems. When the ArrayList has 50.000 elements or more I get a System.StackOverflowException.
I use Microsoft Visual C#.NET with .NET Framework 1.0 version 1.0.3705

Any ideas?

Kind regards
Peter

torrud
December 18th, 2003, 05:52 AM
Hi,

I think the system need ressources to serialize your objects. And if there are to many object the ressources won't be enough. But in your Application you can cut your big ArrayList in a few little ArrayLists and serialize and if you deserialize you concat the ArrayLists to the one you need.
I don't know wheather this is the best way, but I think it's a solution.