Nov11 / kryo

Automatically exported from code.google.com/p/kryo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add a possibility to skip objects #84

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Add skip() method to all serializers and Kryo.
This way, one can skip objects in the input stream without first deserializing 
them into newly created objects.

The implementation should be straight forward. The skip() method method should 
do the same as the read method, but avoid storing read values anywhere.

Original issue reported on code.google.com by romixlev on 21 Aug 2012 at 12:16

GoogleCodeExporter commented 8 years ago
Possibly this could be implemented entirely in Input (or a subclass), without 
Kryo or the serializers knowing the difference.

Original comment by nathan.s...@gmail.com on 21 Aug 2012 at 5:57

GoogleCodeExporter commented 8 years ago
I agree that it could be possible done in Input, but this would then create 
objects and peform the real deserialization and then simply drop it. And this 
would mean the same overhead as for usuall deserialization. Or do I miss 
something?

My idea with skip was to reduce deserialization overhead for objects that are 
not needed.

Original comment by romixlev on 21 Aug 2012 at 6:44

GoogleCodeExporter commented 8 years ago
This could also be useful for support for skipping problematic objects which 
due to code change cannot be deserialized; allowing those to be set to null and 
the remainder of the good objects to be salvaged

Original comment by richard....@gmail.com on 6 Jan 2014 at 9:00

GoogleCodeExporter commented 8 years ago
Further discussion should go on github.
https://github.com/EsotericSoftware/kryo/issues/84

Original comment by nathan.s...@gmail.com on 6 Jan 2014 at 12:25