Skip to content

Stop keeping the full payment history in memory #998

Description

@joostjager

#269 tracks paginating Node::list_payments, and #959 adds that API. However, PaymentStore is still initialized with read_all_objects, and DataStore retains every PaymentDetails in a HashMap for the lifetime of the node. #960 makes the startup reads paginated, which avoids one unbounded list response, but it still reads and decodes the full payment namespace before the node is usable.

This means startup work and steady-state memory usage continue to grow with the complete payment history, even though callers retrieve that history page by page. This will become increasingly relevant for long-lived server deployments.

Related work:

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