Chameleon
                                
                                 Chameleon copied to clipboard
                                
                                    Chameleon copied to clipboard
                            
                            
                            
                        Migrate Adventure mappers to MethodHandles
Confirmation
- [X] I have checked for similar issues.
Problem
The Adventure mappers currently use Reflection to invoke "platform Adventure" methods. Reflection is known to be slow, and this can have an impact on performance on platforms where this is required.
Suggested solution
MethodHandles provide an alternative way to invoke methods, whilst being faster than Reflection. However, they are a little bit more complicated and harder to use than Reflection. Additionally, MethodHandles are typed.
If done correctly, I believe moving to MethodHandles would greatly improve the performance of the Adventure mappers, and may allow us to improve the mappers at the same time. Additionally, given MethodHandles are typed, we may be able to catch more issues at compile-time.
Additional information
No response