Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Oct 12, 2025

Add single-pass document processor for faster reads by combining decode and casting into one pass instead of two, reducing overhead when reading documents. Enabled via DB_SINGLE_PASS_PROCESSOR env var with fallbacks for edge cases. Includes benchmarks to test via DB_SINGLE_PASS_PROCESSOR.

@ItzNotABug ItzNotABug self-assigned this Oct 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 12, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch optimize-encode-decode-casting

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@abnegate abnegate left a comment

Choose a reason for hiding this comment

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

Can you update the description to explain a bit more about the change? From looking through I can't tell where the improvement comes from

Edit: just saw that we're doing casting/decode in a single loop instead of separately. IMO this solution is a bit overkill, we're adding 1.5K lines of code to reduce 2 loops to 1, I'm not opposed to tightening the looping, but I think it could be a lot simpler

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.

3 participants