Skip to content

Conversation

zack13532
Copy link
Collaborator

@zack13532 zack13532 commented Dec 2, 2024

Previously, when asynchronously processing responses for a GetFeaturesBatch request (resulting in many individual GetFeature calls), we searched for the request object in the original request list to determine where to place the response in the response list, so as to maintain ordering. This is less efficient than it could be, because it is a linear search on an ArrayList using the Request object's equals method.

Instead, use the OkHttp tags feature for Calls to store the index as metadata that can be retrieved during response processing, so we can use that directly rather than doing a search.

@zack13532
Copy link
Collaborator Author

zack13532 commented Dec 2, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@zack13532 zack13532 force-pushed the 12-01-remove_usage_of_parallelstream_in_favor_of_stream branch from bcfe62e to 30bf7c0 Compare December 2, 2024 05:00
@zack13532 zack13532 force-pushed the 12-01-use_tags_to_assign_responses_to_result_list branch from 41ee71b to 4cbb04c Compare December 2, 2024 05:01
@zack13532 zack13532 mentioned this pull request Dec 2, 2024
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.

1 participant