Skip to content

Setup concurrency between PDF::IO::Serializer and PDF::IO::Writer #33

@dwarring

Description

@dwarring

Currently the serializer builds a complete AST tree which is then passed to the writer which deconstructs out outputs it.

Simple, but single threaded and creating a memory peak with the need to fully construct the intermediate structrure.

Would be good to use a supply channel, or similar to allow the serializer to construct objects in parallel and the writer to consume them as they become available.

Probably should be stable. I.e. objects are always produced and consumed in the same order, so that output PDF's remain structurally similar when run repeatably.

This should hopefully reduced peak memory usage and improve serialization speeds on multi CPU platforms. Needs to be bench-marked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions