Skip to content

Performance degradation in 1.10.1 after changing the behavior of yield #4401

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

Open
knisht opened this issue Mar 31, 2025 · 1 comment
Open

Comments

@knisht
Copy link

knisht commented Mar 31, 2025

Describe the bug

In IntelliJ, we observe a performance degradation connected to #4255 . It seems that previously skipped tryUnpark starts to be visible in performance snapshots.

Provide a Reproducer

I did not build exact reproducer, but it likely involves a ton of yields; unfortunately, this sometimes happens in production. There is more information in https://youtrack.jetbrains.com/issue/IJPL-182130.

@qwwdfsad
Copy link
Collaborator

We discussed it internally -- the specific pattern is caused by hammering the yield and #4255 added a sound and an obligatory for correctness extra-unpark on yield codepath.
There is room for optimisation -- to avoid unparking if the queue was empty prior to the yield. It is a hypothesis though

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

No branches or pull requests

3 participants