perf: Online feature response construction in a single pass over read rows#6186
Open
ntkathole wants to merge 1 commit intofeast-dev:masterfrom
Open
perf: Online feature response construction in a single pass over read rows#6186ntkathole wants to merge 1 commit intofeast-dev:masterfrom
ntkathole wants to merge 1 commit intofeast-dev:masterfrom
Conversation
3f89e16 to
c726abe
Compare
… rows Signed-off-by: ntkathole <[email protected]>
c726abe to
2c95b00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
The
get_online_featurespath uses a 3-step chain to transform raw online_read results into the protobuf response:Each step allocates its own intermediate lists and re-iterates the full dataset, resulting in 3x passes over the data and unnecessary memory allocations adding measurable overhead to every online serving call.
This PR replace the 3-step chain with a single fused
_populate_response_from_feature_datathat does everything in one pass:The function signature changes from accepting pre-processed feature_data tuples to accepting raw read_rows directly from online_read, removing the need for the intermediate
_convert_rows_to_protobufstep entirely.