Skip to content

Optimize process search results#8163

Merged
timvisee merged 1 commit intodevfrom
optimize-processing-search-result
Feb 17, 2026
Merged

Optimize process search results#8163
timvisee merged 1 commit intodevfrom
optimize-processing-search-result

Conversation

@agourlay
Copy link
Member

@agourlay agourlay commented Feb 17, 2026

The retrieve function at the segment level is using internally a HashMap which is turned into a Vector as return type.

However the most important caller rebuilds a HashMap from it right away.

This PR exposes the HashMap from the segment level and removes a large amount of unnecessary memory allocation.

Those back and forth conversions accounts for 3% of CPU time on the search-* threads.

@agourlay agourlay marked this pull request as ready for review February 17, 2026 12:59
@agourlay agourlay requested a review from timvisee February 17, 2026 13:48
@qdrant qdrant deleted a comment from coderabbitai bot Feb 17, 2026
@timvisee
Copy link
Member

Great find. 3% of CPU time is insane.

@timvisee timvisee merged commit 8813241 into dev Feb 17, 2026
20 of 21 checks passed
@timvisee timvisee deleted the optimize-processing-search-result branch February 17, 2026 14:42
timvisee pushed a commit that referenced this pull request Feb 17, 2026
@timvisee timvisee mentioned this pull request Feb 17, 2026
5 tasks
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.

2 participants