-
Notifications
You must be signed in to change notification settings - Fork 723
YQ-4736 optimized json parser memory usage #25907
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
YQ-4736 optimized json parser memory usage #25907
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 optimizes JSON parser memory usage by refactoring data structures to use contiguous memory layouts and reducing memory allocations.
- Replaced pointer-based column storage with
std::span
for better memory locality - Changed row indexing from 64-bit to 16-bit integers with fixed upper limits
- Consolidated memory buffers to reduce fragmentation and allocation overhead
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
topic_parser_ut.cpp | Updated test fixtures to use std::span instead of pointer-based column access |
topic_filter_ut.cpp | Modified test helper methods to return std::span instead of vector pointers |
raw_parser.cpp | Changed GetParsedColumn to return std::span instead of vector pointer |
parser_abstract.h | Updated interface to use std::span for parsed column data |
json_parser.h | Removed memory complexity comment from buffer configuration |
json_parser.cpp | Implemented core memory optimizations with consolidated buffers and 16-bit indexing |
format_handler.cpp | Updated data handling to work with std::span instead of vector pointers |
purecalc_filter.h | Changed filter interface to accept std::span instead of vector pointers |
purecalc_filter.cpp | Updated filter implementation to work with std::span data access |
filters_set.h | Modified filter set interface to use std::span for data processing |
filters_set.cpp | Updated filter processing logic to handle std::span data structures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🟢 |
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
ydb/core/fq/libs/row_dispatcher/format_handler/filters/purecalc_filter.cpp
Show resolved
Hide resolved
ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.cpp
Outdated
Show resolved
Hide resolved
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ ⚪ Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
Optimized json parser memory usage
Changelog category
Description for reviewers