Skip to content

Commit e5c2df1

Browse files
author
kishansomaiya
committed
Updated the comments
1 parent f9482de commit e5c2df1

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

settings.json.docker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@
684684
"socketTransportProtocols" : ["websocket", "polling"],
685685

686686
/*
687-
* Performance experiment (#7780): room-broadcast NEW_CHANGES to steady-state
687+
* room-broadcast NEW_CHANGES to steady-state
688688
* recipients, keep per-socket catch-up for stragglers.
689689
*/
690690
"roomBroadcastNewChanges": "${ROOM_BROADCAST_NEW_CHANGES:false}",

settings.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@
766766
"socketTransportProtocols" : ["websocket", "polling"],
767767

768768
/*
769-
* Performance experiment (#7780): use room-broadcast NEW_CHANGES fan-out for
769+
* use room-broadcast NEW_CHANGES fan-out for
770770
* steady-state recipients (clients at head-1), while stragglers still catch
771771
* up via per-socket emits.
772772
*

src/node/handler/PadMessageHandler.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,6 @@ exports.updatePadClients = async (pad: PadType) => {
10461046
}
10471047
}
10481048

1049-
// Broadcast the latest revision once for all steady-state recipients (head-1).
10501049
if (syncedSocketIds.length > 0 && headRev >= 0) {
10511050
const revision = await getRevision(headRev);
10521051
const author = revision.meta.author;
@@ -1073,7 +1072,6 @@ exports.updatePadClients = async (pad: PadType) => {
10731072
ns.to(pad.id).emit('message', msg);
10741073
}
10751074
} else {
1076-
// Fallback to direct socket emits if namespace is unavailable.
10771075
for (const socketId of syncedSocketIds) {
10781076
const socket = roomSockets.find((s) => s.id === socketId);
10791077
if (socket != null) socket.emit('message', msg);
@@ -1089,7 +1087,6 @@ exports.updatePadClients = async (pad: PadType) => {
10891087
}
10901088
}
10911089

1092-
// Stragglers still need per-socket catch-up to preserve rev+1 semantics.
10931090
await Promise.all(stragglerSockets.map(async (socket) => {
10941091
const sessioninfo = sessioninfos[socket.id];
10951092
if (sessioninfo == null) return;

0 commit comments

Comments
 (0)