perf(counter): use DoublyLinkedList for pendingOps#27420
perf(counter): use DoublyLinkedList for pendingOps#27420anthony-murphy wants to merge 2 commits into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (104 lines, 2 files), I've queued these reviewers:
How this works
|
Deep ReviewReviewed commit Readiness: 9/10 — ALMOST READY Both prior Path to Ready items are resolved: the description now links the mirrored SharedCell PR #27415, and Path to Ready
Context for Reviewers
For human reviewer
Review history (1 prior review)
|
Related PRs
prep-cell) — theSharedCell.pendingMessageIdschange this PR mirrors.Description
Replaces
SharedCounter'spendingOps: IPendingOperation[]withDoublyLinkedList<IPendingOperation>from@fluidframework/core-utils/internal. Mirrors the mergedSharedCell.pendingMessageIdschange.pendingOps.shift()?.datainstead ofArray.shift().pendingOps.pop()?.data.Why
Array.shift()is O(n) — every counter ACK reindexes the entire pending tail. Burstyincrement()loops are the common counter use; for n in-flight ops, the drain is O(n²).DoublyLinkedList.shift()is O(1).Notes
Pure perf prep — no
reSubmitSquashed, no squash logic, no tests touched, no api-report changes.