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

Reduce memory overhead for TransportableObject #1883

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Sep 11, 2024

  1. Reduce memory overhead for TransportableObject

    * Always represent TransportableObject internally as a single array of
    bytes. Various properties, such as `header`, or `object_string`, decode
    various segments of the byte array.
    
    * Store the serialized object as raw picklebytes without
    base64-encoding. As a result, `get_deserialized()` no longer needs to
    create a temporary copy of the raw picklebytes. The data segment is
    directly unpickled. Base64-encoding is applied to the data segment or
    the entire internal buffer whenever a print friendly representation of
    the `TransportableObject` is desired.
    
    * Since the properties of `TransportableObject` are simply views into
    the underlying buffer, `TransportableObject` may itself be serialized
    efficiently by simply writing out the byte array.
    `
    
    Add backward compatibility layer for deserialization
    cjao committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    ef32837 View commit details
    Browse the repository at this point in the history