Hi Thomas,
Separate post because it's a different train of thought:
I did, but the patches were not migrated from Google Code to GitHub, so
I believed the code changes are lost.
As for the text, I wanted to do my own analysis first, so I'd get a
fresh overview of the design space.
Take-aways:
- I did arrive at a stack-of-lambdas approach, too, but I don't know if
I am really doing the same thing.
- Some alternatives change the serialization order. These probably have
best performance, but order changes are a pretty difficult sell for
project management and library users, so I'm not going to pursue these
unless somebody tells me it's okay to do so.
- Among the order-preserving alternatives, there are various approaches
that work with compiletime-created Runnables instead of runtime-created
lambdas. This removes some of the GC pressure.
- The stack could be preallocated, to further reduce GC pressure.
Relevant only where the same Kryo instance is reused, I don't know if
this is a relevant scenario for performance testing.
The patches on Google Code were not migrated to GitHub, unfortunately.
I did find
https://github.com/EsotericSoftware/kryo/compare/master...romix:kryo:kryo-2.23-continuations.
Might be the same or a closely related patch to what was on Google Code,
I couldn't find out.
Anyway, looking at the GitHub diff, I find it difficult to separate the
basic idea from the consequences of using Continuation-Passing Style.
I see warnings against using CPS when coding manually, specifically when
used in conjunction with trampolining, because maintainability and bug
visibility can suffer greatly. So I guess that diff is not going to be
super helpful - which is a shame actually.
> -
https://github.com/MarcMil/NonRecursiveKryo
Ah, I missed that one.
I am seeing that it hardcodes the assumption that unrecursifying just
FieldSerializer is enough.
Even if this assumption were accurate, I do not think it should be
hardcoded at this time, so I am not taking a deeper look at it.
Regards,
Jo