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

Optimization for AbstractLazyLoadRunMap.loadNumberOnDisk #8494

Merged

Conversation

jglick
Copy link
Member

@jglick jglick commented Sep 15, 2023

Was looking at a thread dump with some performance issues and noticed

[email protected]/java.lang.Throwable.fillInStackTrace(Native Method)
[email protected]/java.lang.Throwable.fillInStackTrace(Throwable.java:787)
[email protected]/java.lang.Throwable.<init>(Throwable.java:270)
[email protected]/java.lang.Exception.<init>(Exception.java:66)
[email protected]/java.lang.RuntimeException.<init>(RuntimeException.java:62)
[email protected]/java.lang.IllegalArgumentException.<init>(IllegalArgumentException.java:52)
[email protected]/java.lang.NumberFormatException.<init>(NumberFormatException.java:55)
[email protected]/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
[email protected]/java.lang.Integer.parseInt(Integer.java:638)
[email protected]/java.lang.Integer.parseInt(Integer.java:770)
jenkins.model.lazy.AbstractLazyLoadRunMap.loadNumberOnDisk(AbstractLazyLoadRunMap.java:344)

There are surely other things going on, but it occurred to me that it is wasteful to construct a stack trace (which can be relatively expensive) just to skip a directory entry which does not look like a number.

Testing done

None.

Proposed changelog entries

  • Small speculative optimization in build loading.

Proposed upgrade guidelines

N/A

Before the changes are marked as ready-for-merge:

Maintainer checklist

@NotMyFault NotMyFault added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Sep 16, 2023
@daniel-beck
Copy link
Member

Small speculative optimization in build loading.

skip-changelog?

@jglick
Copy link
Member Author

jglick commented Sep 18, 2023

Small speculative optimization in build loading.

skip-changelog?

No particular opinion either way.

@NotMyFault NotMyFault added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Sep 19, 2023
@NotMyFault NotMyFault merged commit e996d0c into jenkinsci:master Sep 20, 2023
15 checks passed
@jglick jglick deleted the AbstractLazyLoadRunMap.loadNumberOnDisk branch September 20, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants