-
Bug
-
Resolution: Fixed
-
P2
-
1.4.1, 5.0
-
b58
-
generic
-
generic, solaris_8
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2103457 | 5.0 | Harold Carr | P2 | Closed | Fixed | rc |
Description:
------------
The valuetype encoding in iiop (what is used to marshal Serializables in
iiop) allows implementations to marshal an indirection if it has seen a
structure before. An indirection is basically an offset into the already
marshaled message. Its transparent to the end user.
The problem is that the Sun ValueHandler is not indirecting the repository
ids of valuetypes when it could. In particular given the following data
structure:
Hashtable h = new Hashtable();
for (int hi=0; hi<100; hi++) {
h.put(new String("" + hi), new Integer(hi));
}
when marshaled on the wire we see repository ids for every String and
Integer instance. Our own implementation indirects every instance apart
from the first. Its in our iiop marshaling code. To be clear its the
repository ids of the types not the instances themselves that can be
indirected. Not only does this cut down on the size of messages quite
considerably but unmarshaling an indirection is considerably less
expensive than unmarshaling a string.
Reproducibility:
---------------
You can only determine this behavior by looking at a dump of the bytes
going across the wire.
------------
The valuetype encoding in iiop (what is used to marshal Serializables in
iiop) allows implementations to marshal an indirection if it has seen a
structure before. An indirection is basically an offset into the already
marshaled message. Its transparent to the end user.
The problem is that the Sun ValueHandler is not indirecting the repository
ids of valuetypes when it could. In particular given the following data
structure:
Hashtable h = new Hashtable();
for (int hi=0; hi<100; hi++) {
h.put(new String("" + hi), new Integer(hi));
}
when marshaled on the wire we see repository ids for every String and
Integer instance. Our own implementation indirects every instance apart
from the first. Its in our iiop marshaling code. To be clear its the
repository ids of the types not the instances themselves that can be
indirected. Not only does this cut down on the size of messages quite
considerably but unmarshaling an indirection is considerably less
expensive than unmarshaling a string.
Reproducibility:
---------------
You can only determine this behavior by looking at a dump of the bytes
going across the wire.
- backported by
-
JDK-2103457 Performance problem with valuetypes in JDK 1.4.1 ORB
- Closed