What type of data are you trying to serialize or rather store to disk?  Do
you have pointers in the data.  Don't tell me you don't have pointers just
because it is java.  Java has pointers, it just preteneds it doesn't.  Show
us the datastructure and we can probably help you more.  If each entry has
no pointers than your task should be pretty straightforward.  If you do have
them, you are going to need to find a way to store those so that they are
able to be redetermined.  In a language like java, where you can't do
pointer arithmetic or anything of the sort this can get rather difficult.
Also, have you considered using a database instead of a flat file to store
this data?

- Nick

On 2/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Peter, java serialization is not a good way to do persistent storage
of any kind, especially large data structures.

It has some pretty severe drawbacks:

- It is slow
- It breaks easily (ie, becomes unable to load older data sets) when
  you make even small changes in your code.
- It makes inefficient use of space
- The format is difficult to decode or manipulate in any way other
  than reading or writing with the exact .class file used to generate
  the serialization code.

Java serialization is excellent for RMI, but is pretty poor for any
other use. I've used serialization myself several times and I
regretted it every time (except for when I used it for RMI).

My advice would be to come up with your own data format and use
that.
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to