
Signature
John Bollinger
jobollin@indiana.edu
But if I remember it well, it will be very slow if there are many
reference among the objects. Java will check the reference among the
objects and write that information out as well.
In one project, I ended up writing my own code for that, which speeded
up 10x.
Timo Stamm - 25 Feb 2006 20:00 GMT
Kevin schrieb:
> But if I remember it well, it will be very slow if there are many
> reference among the objects. Java will check the reference among the
> objects and write that information out as well.
> In one project, I ended up writing my own code for that, which speeded
> up 10x.
You can use the transient attribute for members that are cheap to
rebuild, but expensive to serialize.
Timo
John C. Bollinger - 26 Feb 2006 02:14 GMT
> But if I remember it well, it will be very slow if there are many
> reference among the objects. Java will check the reference among the
> objects and write that information out as well.
> In one project, I ended up writing my own code for that, which speeded
> up 10x.
Naturally, if you can make use of knowledge about the details of the
objects being serialized then there is opportunity to improve on the
speed of Java's built-in mechanism. On the other hand, I have trouble
believing that you achieved across-the-board 1000% speedup for general
serializable objects, if indeed your method was generally applicable at
all. (Assuming always that it worked correctly in the first place; I'm
sure you're satisfied that it did.)

Signature
John Bollinger
jobollin@indiana.edu