Skip to content

smp-server: add serverInfoBytes to THandleParams and related functions - #1835

Closed
epoberezkin wants to merge 9 commits into
masterfrom
ed-asriyan-server-info
Closed

smp-server: add serverInfoBytes to THandleParams and related functions#1835
epoberezkin wants to merge 9 commits into
masterfrom
ed-asriyan-server-info

Conversation

@epoberezkin

Copy link
Copy Markdown
Member

No description provided.

ed-asriyan and others added 9 commits July 15, 2026 06:17
* agent: fix rare race conditions in async API

* split async accept too

* fix, reduce diff

* composition

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
Service subscription counters (totalServiceSubs, serviceSubsCount,
ntfServiceSubsCount) are TVar (Int64, IdsHash). modifyTVar' only forces
the pair to WHNF, so `n +/- n'` and `idsHash <> idsHash'` stay
unevaluated and accumulate an unbounded thunk chain under subscription
and delivery churn (the IdsHash chain also retains a bytestring per
update) - a space leak proportional to the number of updates.

Force both components in addServiceSubs/subtractServiceSubs. Verified
with the load bench: svc churn drops from +5.4 KiB/iter (linear) to flat.
@epoberezkin
epoberezkin requested a review from spaced4ndy as a code owner July 26, 2026 14:54
@epoberezkin
epoberezkin deleted the ed-asriyan-server-info branch July 26, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants