[ 
https://issues.apache.org/jira/browse/IGNITE-13618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248442#comment-17248442
 ] 

Andrey Mashenkov edited comment on IGNITE-13618 at 12/12/20, 7:42 PM:
----------------------------------------------------------------------

1. Unfortunatelly, VarHandles/MethodHandle support is limited in Janino.
Seems, it can't correctly compile code and link MethodHandler invoke methods 
with polymorphic signatures. 

As we can't write plain code and access fields/call method directly therefore 
generated code will be very similar to the reflection-based code and 
hardly possible it could be more efficient.

2. Janino expects class body code only, but however JavaPoet can generate only 
full class code with class signature and package declaration.


was (Author: amashenkov):
Unfortunatelly, VarHandles/MethodHandle support is limited in Janino.
Seems, it can't process polymorphic signatures and we can't use MethodHandles.

As we can't write plain code and access fields/call method directly therefore 
generated code will be very similar to the reflection-based code and 
hardly possible it could be more efficient.

> Provide generated and reflection-based class (de)serializers
> ------------------------------------------------------------
>
>                 Key: IGNITE-13618
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13618
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Alexey Goncharuk
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: iep-54, ignite-3
>         Attachments: benchmark-results.txt
>
>
> Let's prototype object serializer for type-system described in IEP-54, and 
> benchmark them to check if generated code approach is a better one.
>  * For reflection-based serializer we can use Unsafe (see GridUnsafe class) 
> which works fine for previour versions of Ignite.
>  * To keep focus on the ticket needs mainly, we can use Janino project for 
> code generator.
>  * In addition, reflection-based serialized could have a version using Java9+ 
> VanHandles and it's could be hidden under 'java-9+' maven-profile.
> Hints:
> Javapoet can be used as codegenerator, Janino as a compiler, class loader. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to