Skip to content

Performance of OperatingSystem.getProcesses() over a large period of time #2073

Answered by dbwiddis
unknown-spirit asked this question in Q&A
Discussion options

You must be logged in to vote

Just a hunch, this may be related to finalizer usage, see #2009.

You can try to inspect the heap when it gets slow to see if you've got GC issues.

If this is the case, I'll be making some changes when JNA 5.12.0 is released (hopefully this week) and releasing OSHI 6.2.0 which should significantly improve performance.

If you want to pre-test a fraction of the possible improvements, check out this branch that I put in a portion of the expected 5.12.0 changes. https://github.com/dbwiddis/oshi/tree/cleanermemory

Replies: 1 comment 46 replies

Comment options

You must be logged in to vote
46 replies
@unknown-spirit
Comment options

@unknown-spirit
Comment options

@dbwiddis
Comment options

@unknown-spirit
Comment options

@dbwiddis
Comment options

Answer selected by unknown-spirit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants