Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting lazy deserialization #81

Closed
adsharma opened this issue Feb 1, 2021 · 1 comment
Closed

Supporting lazy deserialization #81

adsharma opened this issue Feb 1, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@adsharma
Copy link
Contributor

adsharma commented Feb 1, 2021

More context in: google/flatbuffers#6428

Unlike msgpack, flatbuffers has the additional requirement that in a large type with many fields, if the caller is interested in deserializing only a couple of fields, they don't pay the cost of deserializing all fields.

Such a thing could be modeled as:

@dataclass
class LargeObject:
   _field1: type1
   _field2: type2
   ...
   _fieldN: typeN
   
   @lazy_property
   def field1():
      # Code to deserialize
      
   ...

I'm not sure if pyserde can provide an additional @flatbuffer decorator at some point with logic provided by the upstream projects.

No change requested at this time. Putting this on your radar for future discussion.

@yukinarit yukinarit added the enhancement New feature or request label Apr 15, 2021
@yukinarit
Copy link
Owner

Sorry I can't think how to implement this feature ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants