Actions
Bug #16468
closedComputation of ComplianceLevel generates too many objects
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:
Reviewed
Fix check:
Checked
Regression:
Description
The computation of ComplianceLevel is realy inefficient, as it goes on creating many object.
original code was in https://github.com/Normation/rudder/pull/2648/files and is extracted for readability
Test perfs with original method shows:
Computes take ~2000µs first, then ~450µs after 100 iteration, total test is 97038 µs
New compute is ~1000µs for first iteration, ~300µs after 100 iteration, total test is 38208 µs
Old sum is 85µs -> 8µs, total cost 3083µs
New sum is 74µs -> 3µs, total cost 2069µs
JIT does wonder, but still it cannot eradicate all overhead
Actions