Skip to content

Buffer small transport reads and reuse scratch space for XDR padding. - #72

Open
MrTeeett wants to merge 1 commit into
mainfrom
4-reduce-small-reads-and-repeated-allocations-in-bgreaderxdr
Open

MrTeeett wants to merge 1 commit into
mainfrom
4-reduce-small-reads-and-repeated-allocations-in-bgreaderxdr

Conversation

@MrTeeett

@MrTeeett MrTeeett commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Read ahead up to 8 KiB when BGReader's background worker is stopped. Keep large reads direct. Track partial reads with an offset so buffers return to the pool at full capacity. Deliver any pending read error with the last bytes of its block.

Closes #4

Read ahead up to 8 KiB when BGReader's background worker is stopped.
Keep large reads direct. Track partial reads with an offset so buffers
return to the pool at full capacity. Deliver any pending read error
with the last bytes of its block.
@MrTeeett MrTeeett added this to the v0.9.0 milestone Dec 1, 2026
@MrTeeett
MrTeeett requested a review from P1cheneG December 1, 2026 09:27
@MrTeeett MrTeeett self-assigned this Dec 1, 2026
@MrTeeett MrTeeett added enhancement New feature or request performance Performance improvements labels Dec 1, 2026
@MrTeeett MrTeeett linked an issue Dec 1, 2026 that may be closed by this pull request
@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: Go

Go / code-coverage/gotest

main be26d11 4-reduce-small-reads... 7224274 +/-
79% 79% 0%
View coverage of the 5 most impacted files.
File main be26d11 4-reduce-small-reads... 7224274 +/-
fbevent/lifecycle.go 80% 78% -2%
fbconn/fbconn.go 78% 78% 0%
fbtype/dec16.go 74% 74% 0%
fbproto/xdr.go 88% 88% 0%
fbconn/internal...der/bgreader.go 97% 100% +3%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

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

Labels

enhancement New feature or request performance Performance improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce small reads and repeated allocations in BGReader/XDR

1 participant