JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
enhancement_small.png
CLOSED  Enhancement JPPF-141  -  Deserialization performance improvement
Posted Apr 22, 2013 - updated Apr 22, 2013
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Enhancement
  • Status
     
    Closed
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Core
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPPF 3.3.1
Issue description
While implementing Feature request JPPF-135 - Provide a more flexible mechanism for custom serialization extension, I noticed that it was possible to increase the performance by 5% to 10% of the default Java desrialization, by overriding the method ObjectInputStream.resolveClass() as follows:
//ObjectInputStream ois = new ObjectInputStream(in);
ObjectInputStream ois = new ObjectInputStream(in) {
  @Override
  protected Class<?> resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    if (cl == null)  return super.resolveClass(desc);
    return Class.forName(desc.getName(), false, cl);
  }
};
This is easily implemented in JPPFObjectStreamBuilderImpl.newObjectInputStream(InputStream).

#2
Comment posted by
 lolo4j
Apr 22, 19:41
Implemented in branch b3.3 revision 2715

The issue was updated with the following change(s):
  • This issue has been closed
  • The status has been updated, from New to Closed.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.