Skip to content

Conversation

duemir
Copy link
Member

@duemir duemir commented Apr 7, 2022

Use lazy iterable of all items instead of using an eager list of all the items that is stored in a local variable but immediately converted to the iterable.

I was looking through the heap dump in Eclipse MAT. Most of the memory was just taken by the WorkflowRun objects. It caught my attention that the Cleaner thread featured prominently in the Leak report. I looked into it and thought it could be improved a bit. Functionally nothing should change, the thread just no longer directly references all the items for the duration of execution.

I have also taken a chance to refactor the anonymous classes into lambdas in the functional utility class JobInfoHelpers.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Use lazy iterable of all items instead of using eager list of all the items that is stored locally but immediately converted to the iterable.
@duemir
Copy link
Member Author

duemir commented Apr 8, 2022

Bother! Two new SpotBug issues in the files that I didn't even touch 😢

@duemir
Copy link
Member Author

duemir commented May 5, 2022

@Vlatombe do you know if maybe these two new unexpected SpotBug issues in NullSafeFunction and NullSafePredicate showed up because you changed the annotations recently?

@Vlatombe
Copy link
Member

Vlatombe commented May 5, 2022

@duemir There are 19 spotbugs issues on master (same as in this PR), even before the annotations change. No idea how spotbugs think these are new.

@duemir
Copy link
Member Author

duemir commented May 6, 2022

@KostyaSha maybe you have some ideas or comments?

@duemir duemir closed this May 12, 2022
@duemir duemir reopened this May 12, 2022
@duemir
Copy link
Member Author

duemir commented May 13, 2022

Bummer! Rebuild didn't help 😞

@duemir
Copy link
Member Author

duemir commented Aug 19, 2022

Yey! SpotBug cleaned up after merging the latest master.
@KostyaSha maybe you can merge it now.

@duemir
Copy link
Member Author

duemir commented Jan 4, 2023

@lanwen @oleg-nenashev, maybe you can review and merge?

@KostyaSha KostyaSha merged commit d12e66a into jenkinsci:master Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants