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

[JENKINS-40612] More efficient idiom for hasValidDestination #110

Merged
merged 4 commits into from Oct 10, 2017

Conversation

Projects
None yet
4 participants
@jglick
Copy link
Member

commented Oct 9, 2017

@jglick jglick requested a review from stephenc Oct 9, 2017

@reviewbybees

This comment has been minimized.

Copy link

commented Oct 9, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@KostyaSha

This comment has been minimized.

Copy link
Member

commented Oct 9, 2017

So ACLContext is closeable now?

@jglick

This comment has been minimized.

Copy link
Member Author

commented Oct 9, 2017

So ACLContext is closeable now?

It has been since it was introduced—that is its whole reason for existence.

@stephenc
Copy link
Member

left a comment

Think you missed an optimisation

return;
}
for (ComputedFolder<?> p : inst.getAllItems(ComputedFolder.class)) {
for (ComputedFolder<?> p : Jenkins.getInstance().getAllItems(ComputedFolder.class)) {

This comment has been minimized.

Copy link
@stephenc

stephenc Oct 9, 2017

Member

Don’t we have allItems to save sorting the list?

This comment has been minimized.

Copy link
@jglick

jglick Oct 9, 2017

Author Member

Yes, we could apply it here too. I did not because it was not the subject of the PR and it did not at first blush seem like terribly performance-sensitive code. Looking more closely I see that this will be run every minute even if triggers are disabled or infrequent, and I see that you changed the same thing in Trigger.checkTriggers, so it probably does make sense.

jglick added some commits Oct 9, 2017

@jglick

This comment has been minimized.

Copy link
Member Author

commented Oct 9, 2017

@jglick jglick merged commit 533c71e into jenkinsci:master Oct 10, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@jglick jglick deleted the jglick:hasValidDestination-JENKINS-40612 branch Oct 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.