Page MenuHomePhabricator

[lib] improve `processOutboundP2PMessages` in terms of performance
ClosedPublic

Authored by kamil on Aug 28 2024, 10:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 5:12 PM
Unknown Object (File)
Wed, Nov 13, 8:38 PM
Unknown Object (File)
Tue, Nov 12, 5:35 PM
Unknown Object (File)
Sun, Nov 10, 8:13 AM
Unknown Object (File)
Sun, Nov 10, 8:12 AM
Unknown Object (File)
Sun, Nov 10, 7:56 AM
Unknown Object (File)
Sat, Nov 9, 11:36 PM
Unknown Object (File)
Wed, Nov 6, 11:03 PM
Subscribers

Details

Summary

ENG-9096

We need to do it per device, not per message to avoid creating multiple sessions in parallel.

Test Plan

Test DM ops (text messages, settings, reactions, etc.)

Diff Detail

Repository
rCOMM Comm
Branch
land
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Aug 28 2024, 10:22 AM
kamil edited the summary of this revision. (Show Details)
tomek added inline comments.
lib/tunnelbroker/peer-to-peer-context.js
131–133 ↗(On Diff #43775)

It might look a little better as a map instead of a for.

This revision is now accepted and ready to land.Aug 28 2024, 10:26 AM
lib/tunnelbroker/peer-to-peer-context.js
134 ↗(On Diff #43789)

Why do we still go through each message one-by-one, instead of in parallel?

lib/tunnelbroker/peer-to-peer-context.js
134 ↗(On Diff #43789)

Discussed this with @kamil in our 1:1 today. The reason for this is that if we're sending multiple messages to the same device, we would end up initiating the session multiple times, which would be very bad as we'd override the session.

We'll track improving this in ENG-9106