[infinispan-dev] Marshalling/unmarshalling known type
Radim Vansa
rvansa at redhat.com
Mon Apr 25 08:36:15 EDT 2016
Hi,
I've noticed that sometimes we marshall objects just using
output.writeObject() even though we know the target type - one example
for all is CommandInvocationId. That's somewhat suboptimal, as we know
that there won't be any CommandInvocationIdEx, so we could spare the
externalizer lookup and few bytes for object identifier.
Is there any better way than
new CommandInvocationId.Externalizer().writeObject(output,
commandInvocationId)?
Should we use this ^? I guess that object allocation will be eliminated
here easily.
Radim
--
Radim Vansa <rvansa at redhat.com>
JBoss Performance Team
More information about the infinispan-dev
mailing list