blangSDK icon indicating copy to clipboard operation
blangSDK copied to clipboard

Improve performance of cloning

Open alexandrebouchard opened this issue 8 years ago • 2 comments

  • Some immutable stuff to mark for shallow copy, e.g. arrays of integers for sampler cache
  • Datasets
  • Plates, etc [mark as immutable as well]
  • Parallelize!

alexandrebouchard avatar Sep 04 '17 02:09 alexandrebouchard

Note: performance of Cloner vs. Kryo

Kryo 1          88s
Kryo 2 (global) 45s

Cloner          52s
Cloner 2 (glob) 49s

alexandrebouchard avatar Sep 04 '17 02:09 alexandrebouchard

Basically, modify Cloner (add something like private boolean isImmutable(final Class<?> clz) but with object instead), which check if the node is observed (or rather if there is an observed under) to decide if should do deep or shallow. - WARNING: should be coupled with copying set of observed nodes. Arg..

alexandrebouchard avatar Sep 05 '17 16:09 alexandrebouchard