-
Notifications
You must be signed in to change notification settings - Fork 13
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
Introduce new property 'subzero.referenceresolver.class' where we could specify Kryo's ReferenceResolver implementation #25
Conversation
…ld specify Kryo's ReferenceResolver implementation.
Hi, It's rather an enhancement request, but in KryoStrategy#newKryoInstance() we create a Kryo with default MapReferenceResolver. I have found out that in some cases this implementation is a lot more slowly than others, e.g. ListReferenceResolver. The difference sometimes is about 10 times, which is a lot. |
Hi, this PR is a followup to the issue #24 |
@@ -41,10 +47,10 @@ private Kryo newKryoInstance() { | |||
kryo = new Kryo(); | |||
} else { | |||
ClassLoader classLoader = ClassLoaderUtils.getConfiguredClassLoader(hazelcastInstance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt you respect the properties even when the IGNORE_HAZELCAST_CLASSLOADER
is set to true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. We could assume that the property com.esotericsoftware.kryo.util.MapReferenceResolver
should ignore whether the Hazelcast class loader is ignored or not as we care only about the ReferenceResolver
.
So in line 42 we should have sth like this:
kryo = new Kryo(createReferenceResolver());
Do you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. ☝️ looks good.
thanks for the PR!
Hi, |
thanks for the PR, I will push a new release out today! |
@acieplak: I just released 0.8 version with your fix. it should appear in Maven Central in a short while. |
Hi, I'm glad to hear that. Thanks a lot :-) Best regards, |
No description provided.