Actions
Bug #20310
closedMethod getByRulesCompliance used by API is highly inefficient
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
It starts by computing the targets of all groups, and then creates a map of ruleId -> computed-targets-of-said-rules with no answer as a compliance (A)
Then it construct for each rules the ByRuleRuleCompliance (B), but in there it- construct a map of ComponentName, Seq[NodeId, ComponentStatusReports]
- use this map to convert to Seq of ByRuleComponentCompliance (without using the map property, could have been a seq)
- and in the conversion, it converts a List[NodeId, ValueReports] to a Map[NodeId, List[NodeId, ValueReports]], where it sorts the list by componentName, then takes the value of them, rather than using lightweight version of the list
finally, it concatenates A and B
I'm quite convinced that nothing from A remains after this operation
Actions