Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Fast serialization #77

Closed
wants to merge 0 commits into from

Conversation

sandlerwang
Copy link
Collaborator

Summary:
Introduce fast serialization feature.
This feature can be enabled by -Dcom.alibaba.enableFastSerialization=true. Porting from dragonwell-project/dragonwell11@bfdc905 and the origin author is lei.yul.

  1. Create a ClassResolveCache to reduce calls to Class.forName(String)
  2. Cache latestUserDefinedLoader(): The loader can be safely cached inside the ObjectInputStream class, once custom readObject() methods are invoked, the cache will be invalid.

For simple data objects, we can observe a 26% performance improvement. See com.alibaba.bench.java.io.ObjectInputStreamTest.

Reviewed-by: lei.yul, kuaiwei

Test Plan:
Add one more round for ObjectInputStream jtreg test with -Dcom.alibaba.enableFastSerialization=true

Issue: #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant