United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4901731 : IIOP serialization is slow for large objects

Details
Type:
Bug
Submit Date:
2003-08-06
Status:
Closed
Updated Date:
2003-12-17
Project Name:
JDK
Resolved Date:
2004-12-10
Component:
other-libs
OS:
solaris_9
Sub-Component:
corba:idl
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
1.4.2 (04)

Related Reports
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
Customer Problem Description:
-------------------------------
Given the structure:

     int iters = 100000;
     HashMap h = new HashMap();
     for (int i=0; i<iters; i++) {
       h.put(new String("Hello" + i), "Hi there" + i);
     }

- Serialization of this under java.io takes 1.3s
- Serialization of this using the WLS ORB (with some fixes) takes 6.7s to 
marshal and 2.3s to unmarshal. Since we use the JDK valuehandler in our ORB it doesn't seem that this can be a valuehandler problem but something more fundamental.
- However serialization with the JDK 1.4.1_03 ORB takes 238s to marshal and 
an unbelievable 1600s to unmarshal.

Attached is a testcase. Please uncomment the lines for ORB and comment
it for java_io while testing the scenario with ORB.

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_04
tiger-beta

FIXED IN:
1.4.2_04

INTEGRATED IN:
1.4.2_04
tiger-b31
tiger-b32

VERIFIED IN:
1.4.2_04


                                     
2004-06-14
SUGGESTED FIX

please see http://javaweb/~tao/4901731/141/webrev/
###@###.### 2003-08-07
                                     
2003-08-07
EVALUATION

it seems that the following -
1. FastCacheTable in com.sun.corba.se.internal.orbutil
grows linearly, it grows for 100 new entries each time
2. CDRInputStream_1_0 use CacheTable without hashing 

can be changed to -
1. FastCacheTable grow exponentially, double the size everytime
2. CDRInputStream_1_0 use hashing, pass true into CacheTable's 
constructor, looks like CDROutputStream_1_0 is already doing this 

after this in my testing both input and output takes about 7s

###@###.### 2003-08-07
                                     
2003-08-07



Hardware and Software, Engineered to Work Together