Skip to content

feat: optimize projected read buffer copies#5

Merged
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:feat/read-copy-opt
May 19, 2026
Merged

feat: optimize projected read buffer copies#5
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:feat/read-copy-opt

Conversation

@QuakeWang
Copy link
Copy Markdown
Contributor

Projected reads already avoided unnecessary IO for sparse paged buckets, but the reader still copied buffers at several internal boundaries.

Before this PR:

  • read_ranges coalesced IO ranges, then copied each logical range into its own Vec<u8>.
  • Paged projection copied selected slot bytes into an intermediate map before parsing.
  • parse_column_slot copied the decompressed page payload after parsing its header.

This PR keeps the existing format and read_ranges API, but adds a shared range buffer path for projected reads. The reader now borrows slices from coalesced buffers during parsing, stores paged slot locations instead of slot bytes, and lets ColumnPageReader parse from an offset inside the owned decompressed page buffer.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
@JingsongLi
Copy link
Copy Markdown
Contributor

Nice Catch!

Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit c838f62 into apache:main May 19, 2026
2 checks 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