You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[java] Compile time processing of row format codecs聽#3671
Currently, Fory Java will generate all row codec classes at runtime. You can see it print in the application startup logs - generate source code, compile, load class.
Java supports compiler hooks in the form of annotation processors. This allows you to inspect code under compilation, generate new code, and then have javac continue to compile that.
Would it make sense to add support to Fory to pre-generate codec classes during compile time? Then your deployable application already has all classes available, potentially pre-verified and pre-linked using class data sharing, without bringing a compile step into runtime.
I note some open issues about foryc compiler with a Maven plugin, but this seems to be a different issue, more related to IDL compilation.
The generated code will be less flexible - not possible to dynamically link in an updated version of Fory, you must inline any runtime Fory deps.
Is this an interesting approach? If it would not conflict with any other project future directions, I might attempt a prototype at some point.
This is interesting. Actually I have implemented annotation processor to generate static serializer in #3670. You can extend it, to add row format encoder support later.
Hi! I鈥檇 like to work on this issue. I鈥檒l first review the annotation processor implementation in #3670 and understand how the existing static serializers are generated. Then I鈥檇 like to explore extending it to support row format encoder generation at compile time. If the approach looks feasible, I鈥檇 be happy to work on a PR.
Activity
chaokunyang commentedon May 11, 2026
This is interesting. Actually I have implemented annotation processor to generate static serializer in #3670. You can extend it, to add row format encoder support later.
stevenschlansker commentedon May 11, 2026
That is very interesting, I will follow your PR and consider extending it.
alisha-1000 commentedon Sep 14, 2026
Hi! I鈥檇 like to work on this issue. I鈥檒l first review the annotation processor implementation in #3670 and understand how the existing static serializers are generated. Then I鈥檇 like to explore extending it to support row format encoder generation at compile time. If the approach looks feasible, I鈥檇 be happy to work on a PR.