Optimize sending Stream Management ACKs (#98)
Andrzej Wójcik (Tigase) opened 3 years ago

Currently, SM ACK stanzas (<a/>) are sent after receiving 5 unconfirmed stanzas or after receiving <r/> stanza. We have to answer on each <r/> stanza, but it would be better to send <a/> after receiving the stanza with a delay so that when a lot of stanzas are being received (ie. during MAM sync) we would send <a/> less ofter than once for each 5 messages. This would also help with confirming receiving a single message as it would be confirmed even if less than 5 were received since the previous <a/> was sent.

Andrzej Wójcik (Tigase) commented 3 years ago

I've implemented this feature by delaying confirmation by 100ms (with the option to configure this value). During fast MAM sync, this change resulted in sending <a/> once after ~120 synced messages instead once every 5 messages.

Please wait...
Page is in error, reload to recover