chaokunyang opened a new issue, #1680:
URL: https://github.com/apache/incubator-fury/issues/1680
## Is your feature request related to a problem? Please describe.
In #1679 , the copy is implemented using loop and branch. We can optimize it
by generate code to copy object attributes recusively.
## Describe the solution you'd like
- For JIT serializer, don't generate copy code in previous serializer
builder. copy is not needed by all scenarios, generate code for copy will make
the jit slower and use more metaspace.
- Instead, we should generate a class which implement the copy interface
and forward the copy to that class.
For example, we can add a copy forward implemetation in
`io.fury.builder.Generated.GeneratedSerializer`:
```java
public Object copy(Object o) {
Copy copier = this.copier;
if (copier == null) {
this.copier = copier = classResolver.getJITCopier(o.getClass());
}
return copier.copy(o);
}
```
## Additional context
#1679
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]