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

Do not parallelize definition building if it gives no advantage #10776

Merged
merged 1 commit into from
May 3, 2024

Conversation

andriy-dmytruk
Copy link
Contributor

For the cases with 1 or 2 cores the fork join pool is of size 1 and therefore does not achieve parallelized execution. For this case, we can load definitions on the main thread.

This did not produce significant performance improvements on my machine when I set -XX:ActiveProcessorCount=1 JVM option, so the overhead of using the pool is probably minimal. But this will get rid of the case when the main thread is on the same thread as the fork-join pool worker and is waiting for it, which I could not test on my machine.

For the cases when there are 1 or 2 cores the fork join pool is of size 1 and therefore does not achieve parallelized execution. For this case we can load definitions on the main thread.
Copy link

@andriy-dmytruk andriy-dmytruk requested a review from yawkat April 29, 2024 18:47
@yawkat yawkat merged commit 4b2e3cc into 4.5.x May 3, 2024
17 checks passed
@yawkat yawkat deleted the andriy/definition-parallelization branch May 3, 2024 06:43
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