-
Notifications
You must be signed in to change notification settings - Fork 9
perf: remove rope #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: remove rope #200
Conversation
There was a problem hiding this 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 refactors the StreamChunks trait architecture by introducing a new Chunks trait and splitting streaming logic from source implementations. The main changes include:
- Introducing a new
Chunkstrait with astreammethod that takes object pool, options, and callbacks - Converting
StreamChunks::stream_chunksto returnBox<dyn Chunks + 'a>instead of directly streaming - Removing the
rope()method from theSourcetrait - Changing
BoxSourcefromArc<dyn Source>toBox<dyn Source>
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/compat_source.rs | Commented out entire test file |
| src/source_map_source.rs | Updated to use new Chunks trait pattern with SourceMapSourceChunks wrapper |
| src/source.rs | Removed rope() method, changed BoxSource from Arc to Box, updated StreamChunks trait signature |
| src/replace_source.rs | Introduced ReplaceSourceChunks wrapper, removed rope() implementation, contains typo "chunsk" |
| src/raw_source.rs | Added RawStringChunks and RawBufferSourceChunks wrappers using new Chunks trait |
| src/original_source.rs | Added OriginalSourceChunks wrapper, updated to use new Chunks trait |
| src/lib.rs | Exported new Chunks trait in stream_chunks module |
| src/helpers.rs | Introduced Chunks trait, updated get_map and stream_and_get_source_and_map signatures |
| src/concat_source.rs | Added ConcatSourceChunks wrapper, removed rope() implementation |
| src/cached_source.rs | Added CachedSourceChunks wrapper, commented out test, removed rope() usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a1bad22 to
10c1172
Compare
10c1172 to
aff485f
Compare
CodSpeed Performance ReportMerging #200 will improve performances by 49.63%Comparing Summary
Benchmarks breakdown
Footnotes
|
4f17f19 to
c5719e7
Compare
c5719e7 to
a6acd0e
Compare
This PR refactors the
StreamChunkstrait architecture by introducing a newChunkstrait and splitting streaming logic from source implementations. The main changes include:Chunkstrait with astreammethod that takes object pool, options, and callbacksStreamChunks::stream_chunksto returnBox<dyn Chunks + 'a>instead of directly streamingrope()method from theSourcetraitBoxSourcefromArc<dyn Source>toBox<dyn Source>