Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #16201: Inefficient computing of compliance on home page #2615

Conversation

ncharles
Copy link
Member

@ncharles
Copy link
Member Author

Do not merge, need more work

@ncharles ncharles force-pushed the bug_16201/inefficient_computing_of_compliance_on_home_page branch from 941f0df to 61a73ce Compare November 18, 2019 16:26
@ncharles
Copy link
Member Author

Commit modified

@@ -455,7 +434,7 @@ trait DefaultFindRuleNodeStatusReports extends ReportingService {
} yield {
val t2 = System.currentTimeMillis
//we want to have nodeStatus for all asked node, not only the ones with reports
val nodeStatusReports = runInfos.map { case (nodeId, runInfo) =>
val nodeStatusReports = runInfos.par.map { case (nodeId, runInfo) =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part hasn't been tested yet

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but without the par, with 5000 nodes it takes 22s

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a linear improvement

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for reference: this causes deadlocks - see https://issues.rudder.io/issues/16256

@ncharles
Copy link
Member Author

Commit modified

@ncharles ncharles force-pushed the bug_16201/inefficient_computing_of_compliance_on_home_page branch from 61a73ce to 6d33a8a Compare November 18, 2019 20:49
@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/2615
-- Your faithful QA
Kant merge: "Morality is not the doctrine of how we may make ourselves happy, but how we may make ourselves worthy of happiness."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/17334/console)

@ncharles
Copy link
Member Author

OK, merging this PR

@ncharles ncharles merged commit 6d33a8a into Normation:branches/rudder/5.0 Nov 19, 2019
@ncharles
Copy link
Member Author

OK, merging this PR

1 similar comment
@ncharles
Copy link
Member Author

OK, merging this PR

))
}
def getGlobalUserCompliance(): Box[Option[(ComplianceLevel, Long)]] = {
val n1 = System.currentTimeMillis
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha, i forgot to remove this one

@ncharles
Copy link
Member Author

OK, merging this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants