Skip to content

Conversation

@SyMind
Copy link
Collaborator

@SyMind SyMind commented Sep 22, 2025

This PR optimizes buffer calculation by replacing direct buffer concatenation with a writer-based approach to improve performance when calculating source buffers.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 22, 2025

CodSpeed Performance Report

Merging #165 will not alter performance

Comparing SyMind:refactor-buffer (7ce7075) with main (ed6fa44)

Summary

✅ 7 untouched

@SyMind SyMind changed the title perf: buffer accept writer perf: concat source buffer using writer Sep 24, 2025
@SyMind SyMind changed the title perf: concat source buffer using writer perf: using writer to calculate concat source buffer Sep 24, 2025
@SyMind SyMind marked this pull request as ready for review September 24, 2025 02:43
Copilot AI review requested due to automatic review settings September 24, 2025 02:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes buffer calculation by replacing direct buffer concatenation with a writer-based approach to improve performance when calculating source buffers.

  • Replaces iterator-based buffer concatenation with writer approach in ConcatSource::buffer()
  • Updates CachedSource::buffer() to use the same writer-based pattern for consistency

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/concat_source.rs Replaces buffer concatenation logic with writer-based approach
src/cached_source.rs Updates buffer method to use writer pattern instead of delegating to inner source

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SyMind SyMind merged commit 0ac0616 into rstackjs:main Sep 24, 2025
7 checks passed
@SyMind SyMind deleted the refactor-buffer branch September 24, 2025 08:59
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