Skip to content

perf: Improve parse json performance #90

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

Merged
merged 3 commits into from
Aug 2, 2025
Merged

Conversation

b41sh
Copy link
Member

@b41sh b41sh commented Jul 30, 2025

This PR introduces several performance optimizations and feature enhancements to the jsonb implementation, focusing on speed and memory efficiency.

Key Changes:

  • Extended Syntax Support: Added parse_value and parse_value_standard_mode functions to support both extended and standard JSON syntax.
  • Direct OwnedJsonb Parsing: Introduced parse_owned_jsonb, parse_owned_jsonb_standard_mode, parse_owned_jsonb_with_buf, and parse_owned_jsonb_standard_mode_with_buf functions for direct parsing into OwnedJsonb, avoiding unnecessary conversions. with_buf variants allow passing a result_buf argument for storing OwnedJsonb data.
  • Optimized i256/Decimal Handling: Significantly improved parsing and display performance for i256 and Decimal data types.
  • Object Parsing Improvements:
    • Introduced JsonAst as an intermediate representation for object parsing.
    • Objects are now stored in a Vec instead of a BTreeMap for faster insertion.

fix #10

@b41sh b41sh requested a review from sundy-li August 1, 2025 01:00
@b41sh b41sh merged commit ba7802f into databendlabs:main Aug 2, 2025
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.

perf: Improve JSON parsing performance
2 participants