Name: skT45625 Date: 05/25/2000
java version "1.3.0rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, mixed mode)
RMI is unusably slow to in cases where the an argument or return value is a
large object graph
that contains many objects that implement java.rmi.Remote. The root cause for
this is that the
subclass of ObjectOutputStream that Sun's implementation uses replaceObject. The
lookup
method within ObjectOutputStream is linear:
/*
* Return a replacement for 'forObject', if one exists.
*/
private Object lookupReplace(Object obj) {
for (int i = 0; i < nextReplaceOffset; i+= 2) {
if (replaceObjects[i] == obj)
return replaceObjects[i+1];
}
return obj;
}
Wire handles use a hashtable, how about replaced objects, too!
(Review ID: 105334)
======================================================================
- duplicates
-
JDK-4332215 ObjectOutputStream replacement table search is linear
-
- Closed
-