Actions
Bug #20758
closedImprove group node computation
Status:
Released
Priority:
N/A
Assignee:
Category:
Performance and scalability
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
Description
As a follow up of #20716, we could improve the code lisibility by:
- not having the `internalQueryProcessor` return a NodeInfo, but only NodeId. The overall cost of managing NodeInfo is tremendous in creating Sets
- so rather than having a `nodeInfoFiltered`, we could have `nodeIdFiltered`
- This is only possible in 7.0 and + because in branch 6.2 it still need the ServerRole postfilter
- in PostFilterNodeFromInfoService we can have a faster "toSet" for the OR composition by mapping to nodeId only
- and `foundNodeInfos` could be a Seq rather than a Set (an make the toSet on the foundNodeInfos.map(_.nodeId) )
- and so the results in internalQueryProcessor can also be a Seq
The drawback is only for the SearchNodeComponent: it will have to explore back the cache with the list of nodeId to get the result
The overall cost a doing a toSet on collection of NodeInfo is very expensive
Actions