Skip to content

Read Box<[u8]> in bulk instead of byte by byte - #390

Merged
mat-1 merged 1 commit into
azalea-rs:mainfrom
Hexay:bulk-read-boxed-bytes
Oct 6, 2026
Merged

mat-1 merged 1 commit into
azalea-rs:mainfrom
Hexay:bulk-read-boxed-bytes

Conversation

@Hexay

@Hexay Hexay commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Box<[u8]> was reading chunk data and light arrays got read one byte at a time.
This measured decoding level_chunk_with_light: ~90 us -> ~3.4 us per packet, whole stream: ~650 ms -> ~240 ms

With 50 bots replayed joining took 1.0s instead of 2.3s. Steady state didn't change and nothing errored.

@mat-1 mat-1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good find, thanks!

@mat-1
mat-1 merged commit 40455fc into azalea-rs:main Oct 6, 2026
1 check passed
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.

2 participants