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

Do not search for last build if concurrent build is allowed #3227

Merged
merged 1 commit into from Jan 12, 2018

Conversation

4 participants
@Jimilian
Contributor

Jimilian commented Jan 11, 2018

The switch of order in check allows to reduce memory consumption in high
loaded systems.

Proposed changelog entries

  • Internal: Reduce memory consumption for concurrent jobs

Submitter checklist

  • [-] JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests
  • [-] For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@svanoort @oleg-nenashev @jglick

jenkins.model.lazy.AbstractLazyLoadRunMap#search is not optimised for searching from end (DESC order), because it copies array every time. Will address it in another PR.

screen shot 2018-01-11 at 13 34 14

Do not search for last build if concurrent build is allowed
The switch of order in check allows to reduce memory consumption in high
loaded systems.
@svanoort

I really like these easy-to-verify micro-optimizations. When you add up a bunch of them, the impact will likely be significant.

@oleg-nenashev

This comment has been minimized.

Member

oleg-nenashev commented Jan 12, 2018

Test failure is unrelated.
@Jimilian if you want to get it landed in 2.89.4, please create a JIRA ticket

@oleg-nenashev oleg-nenashev merged commit 8db2ffb into jenkinsci:master Jan 12, 2018

1 check failed

continuous-integration/jenkins/pr-head This commit has test failures
Details

@Jimilian Jimilian deleted the Jimilian:cheap_check_first branch Mar 7, 2018

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