This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Deserialization speed?

Barnet Wagman wrote:

> With the change that Warren suggested,  gcj deserialization works with
> version cc version 2.97 20010117 (experimental).
> However, in a non-test case with a largish serialized object (~ 7 mg),
> derserialization is very slow, ~ 300 seconds compared to ~ 6.5 seconds
> using the jvm.  Any idea as to what's going on?

Having looked at the serialization code today I can tell you that it
definatly does not appear to have been written with efficiency in mind

Profiling with gprof may well give some insight as to where the worst
inefficiencies lie.

A couple of possibilities (although I'm not sure if these alone would
account for the exponential slowdown you are seeing):

1. There is a lot of debugging code present in the ObjectStream classes
which is disabled by default by setting a boolean constant. Unfortunatly,
the compiler isn't yet smart enough to actually optimize this out
(especially considering that we don't even compile libgcj's java code
with optimization yet).

2. Serialization relies on reflection, which is known to be quite slow in


  [ bryce ]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]