Skip to content

Cache verified remote contiguous length#810

Open
marcus-pousette-hp wants to merge 1 commit into
mainfrom
perf/replicator-request-range
Open

Cache verified remote contiguous length#810
marcus-pousette-hp wants to merge 1 commit into
mainfrom
perf/replicator-request-range

Conversation

@marcus-pousette-hp
Copy link
Copy Markdown
Contributor

@marcus-pousette-hp marcus-pousette-hp commented May 14, 2026

Before:

read remoteContiguousLength
-> scan remote bitfield from stale cached position
-> return higher value
-> cache stays stale
-> next read scans same area again

After:

read remoteContiguousLength
-> scan remote bitfield once
-> cache the verified higher value
-> next read starts from the higher value

Local bench test from before and after patch.

10k reads over a 50M-bit verified contiguous extent
before: ~51.7 ms
after:  ~2.26 ms

PR was Co-authored with AI.

@marcus-pousette-hp marcus-pousette-hp requested a review from a team May 14, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant