Skip to content

Solo editing perf track local branch array#19272

Merged
yann-achard-MS merged 8 commits into
microsoft:mainfrom
yann-achard-MS:solo-editing-perf-track-local-branch-array
Jan 18, 2024
Merged

Solo editing perf track local branch array#19272
yann-achard-MS merged 8 commits into
microsoft:mainfrom
yann-achard-MS:solo-editing-perf-track-local-branch-array

Conversation

@yann-achard-MS
Copy link
Copy Markdown
Contributor

@yann-achard-MS yann-achard-MS commented Jan 17, 2024

Description

Before this PR, the "EditManager - Bench No concurrency Many local edits" benchmark reports the following times on a dev workstation:

status  name                                          period (ns/op)  relative margin of error  iterations per batch  batch count  total time (s)
------  --------------------------------------------  --------------  ------------------------  --------------------  -----------  --------------
    ✔   Process the sequencing of 1 local commits           1,317.27                    ±1.42%                     1       21,286            5.00
    ✔   Process the sequencing of 10 local commits          9,143.64                    ±1.00%                     1       11,520            0.92
    ✔   Process the sequencing of 100 local commits       356,412.61                    ±1.00%                     1          912            0.45
    ✔   Process the sequencing of 1000 local commits   27,710,768.29                    ±0.98%                     1           41            1.24

After this PR:

status  name                                          period (ns/op)  relative margin of error  iterations per batch  batch count  total time (s)
------  --------------------------------------------  --------------  ------------------------  --------------------  -----------  --------------
    ✔   Process the sequencing of 1 local commits           1,163.39                    ±2.21%                     1       19,962            5.00
    ✔   Process the sequencing of 10 local commits          4,308.33                    ±1.94%                     1       20,516            5.00
    ✔   Process the sequencing of 100 local commits        44,794.80                    ±1.00%                     1        5,599            0.95
    ✔   Process the sequencing of 1000 local commits      574,640.66                    ±1.00%                     1        2,319            3.26

Changes

The EditManager now maintains an array of commits that represents the changes on the local branch that are not yet on the trunk. This saves the EditManager manager from having to re-crawl the local branch every time a commit from the local branch is sequenced.

Breaking Change

No breaking changes

@github-actions github-actions Bot added area: dds Issues related to distributed data structures area: dds: tree base: main PRs targeted against main branch labels Jan 17, 2024

manager.advanceMinimumSequenceNumber(brand(2));
// Advancing the minimum sequence number does not evict any commits because fork1 branches off of the trunk before commit 1.
// Advancing the minimum sequence number does not evict any commits because fork1 branches off of the trunk at commit 1.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated. I forgot to commit it in the previous PR.

@yann-achard-MS yann-achard-MS marked this pull request as ready for review January 17, 2024 23:42
@yann-achard-MS yann-achard-MS requested a review from a team as a code owner January 17, 2024 23:42
Comment thread packages/dds/tree/src/shared-tree-core/editManager.ts
@msfluid-bot
Copy link
Copy Markdown
Collaborator

@fluid-example/bundle-size-tests: +386 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 506.5 KB 506.54 KB +44 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 241.29 KB 241.32 KB +22 Bytes
loader.js 166.56 KB 166.58 KB +22 Bytes
map.js 46.61 KB 46.62 KB +11 Bytes
matrix.js 148.45 KB 148.46 KB +11 Bytes
odspDriver.js 95.32 KB 95.36 KB +33 Bytes
odspPrefetchSnapshot.js 41.58 KB 41.61 KB +22 Bytes
sharedString.js 164.05 KB 164.06 KB +11 Bytes
sharedTree.js 294.51 KB 294.71 KB +199 Bytes
Total Size 1.81 MB 1.81 MB +386 Bytes

Baseline commit: 0302e83

Generated by 🚫 dangerJS against 7e57c8b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: tree area: dds Issues related to distributed data structures base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants