[MDSAL-399] Use MethodHandles in LazyDataObject to acquire foreign data Created: 16/Nov/18 Updated: 18/Nov/18 Resolved: 18/Nov/18 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding runtime |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Methods handles allow us to better embed into the call site, bypassing access checks (which are invariant anyway). Refactor LazyDataObject and DataObjectCodecContext to allow us to use them, which will probably enlarge our memory footprint, but should be an overall win. |
| Comments |
| Comment by Robert Varga [ 16/Nov/18 ] |
|
Acquiring data from other objects via MethodHandles means we will no longer have access to a Method in getBindingChildValue(), but rather a string. Since we currently use the same map to hold methods which we need to inquire and their associated prototypes, addressing this issue will finish conversion of lookup keys from Method to String. |
| Comment by Robert Varga [ 18/Nov/18 ] |
|
This is not worth it, as we are just dancing around java.lang.reflect.Proxy. It will be better to ditch it completely. |