Re: Efficient hashmap serialization?
- From: "jan V" <nul@xxxxxx>
- Date: Fri, 02 Sep 2005 18:45:05 GMT
> I have a a hash map full of objects that contain references to other
> objects in that map, grouped in a threaded message fashion. There's a
> linked list style previous messages and next message.
>
> I serialize this map to send it over RMI, but it seems quite slow.
>
> Does anyone have any recommendations on efficiently serializing it? I
> know I will have to write a function to serialize the objects manually
> but not much beyond that.
Can you give us the types of the keys and values of your Map? Are the
messages plain Strings, or are you using a proper message abstraction type?
If you understand what Serialization does for you, maybe you will change
your opinion on it being quite slow... it's got a lot to do, and it does
everything through reflection.
If you really, really need to speed things up, then consider writing custom
private readObject()/writeObject() methods for your Map's value objects...
though you should profile the serialization step to see what really is
causing the whole thing to eat time.
.
- Follow-Ups:
- Re: Efficient hashmap serialization?
- From: Sn0tters@xxxxxxxxxxx
- Re: Efficient hashmap serialization?
- References:
- Efficient hashmap serialization?
- From: Sn0tters@xxxxxxxxxxx
- Efficient hashmap serialization?
- Prev by Date: Re: What´s needed to run an applet?
- Next by Date: Re: What´s needed to run an applet?
- Previous by thread: Efficient hashmap serialization?
- Next by thread: Re: Efficient hashmap serialization?
- Index(es):
Relevant Pages
|