Skip to content

relay: rewrites the whole event file on every stored EVENT #6

Description

@melvincarvalho

relay/ storeEvent calls persistAll()fs.writeFileSync of the entire event array (up to maxEvents, default 1000) per incoming EVENT — blocking O(N) I/O on the event loop. Per-socket rate limiting (60/min) bounds a single client, but many sockets sustain it.

Fix direction: an append-only log (one line per event, like the JSONL the sweeper already tolerates) instead of a full-file rewrite. Accepted-risk in SECURITY.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance / resource-efficiency

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions