# High priority stanza responses during sync

**URL:** <https://hub.soprani.ca/t/high-priority-stanza-responses-during-sync/885>\
**Category:** Issues\
**Tags:** borogove\
**Created:** [November 3, 2026, 3:42pm UTC](https://hub.soprani.ca/t/high-priority-stanza-responses-during-sync/885 "2026-11-03T15:42:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [November 3, 2026, 3:42pm UTC](https://hub.soprani.ca/t/high-priority-stanza-responses-during-sync/885/1 "2026-11-03T15:42:21Z")

</div>

This is sort of a protocol issues but we could put thought into the best mitigation. Basically when we send a MAM request to the server (or to a MUC etc) it replies with possibly hundreds of message stanza. And joining a MUC also replies with hundreds of presence stanzas. These all get queued up to come to us and we want to process them as quickly as possible. Ideally this shouldn’t take long, I mean it’s just CPU bound on XML parsing mostly right? We can do I/O async (though be careful) and not block stanza processing on it etc. Even so, we may find it takes quite some time to actually get all the stanzas cleared out of the TCP channel, and in the meantime anything we send waits on a reply. So eg a call comes in during a big sync, we click “join call” to send a stanza to answer the call, then we wait for the reply. No reply is seen until the stanzas ahead of it in the TCP channel all get cleared out, which makes it seem like nothing has happened.
