Github user mpollmeier commented on the issue:

    https://github.com/apache/tinkerpop/pull/705
  
    That's very true. I just experimented with deep clones and it doesn't look 
straightforward
    * kryo can do it directly, but all referenced classes need a 
no-arg-constructor, and since there are some coming in from apache commons, it 
doesn't look like it's feasible. 
https://github.com/EsotericSoftware/kryo#copyingcloning
    * java's builtin ByteArrayOutputStream has a similar problem: all 
referenced classes need to be marked as `Serializable`
    * implementing `clone` for TinkerVertex, TinkerEdge, TinkerProperty etc. is 
hard because they all reference each other, i.e. you're in a chicken and egg 
situation. 
    
    I guess we have two options: 
    1) accept that it's a shallow copy and add a comment, as you suggested
    2) disregard this PR
    
    Thoughts? Any other ideas for making a deep copy? There's always the option 
to serialise it into graphml/graphson etc., but that's slow for large graphs. 


---

Reply via email to