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

Cache result of slow function resolution on Any that is present on a hot path #6536

Merged
merged 4 commits into from
May 4, 2023

Conversation

hubertp
Copy link
Collaborator

@hubertp hubertp commented May 3, 2023

Pull Request Description

Otherwise things can go horribly slow.
Closes #6523. Follow up on #6441.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible. (Benchmarks now run as before)

@hubertp hubertp added the CI: No changelog needed Do not require a changelog entry for this PR. label May 3, 2023
@hubertp hubertp requested a review from Akirathan May 3, 2023 16:34
@hubertp hubertp force-pushed the wip/hubert/6523-fix-test-benchmarks branch from d771f6f to d0c57ba Compare May 3, 2023 16:35
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what is the goal of the change? I am surprised to see two copies of the same specialization. I don't understand the motivation for such change.

hubertp added 4 commits May 4, 2023 12:18
Otherwise things can go horribly slow.
Closes #6523.
As per PR review
Applying PR review.

Had to be a bit careful so that we don't trip on automatic resource
managment on `self`.
@hubertp hubertp force-pushed the wip/hubert/6523-fix-test-benchmarks branch from 834df4f to cafffaa Compare May 4, 2023 10:18
@hubertp hubertp changed the title Cache resolution of symbol for Any Cache slow function resolution on Any present on a hot path May 4, 2023
@hubertp hubertp changed the title Cache slow function resolution on Any present on a hot path Cache result of slow function resolution on Any that is present on a hot path May 4, 2023
"cachedSymbol == symbol",
"cachedSelfTpe == typesLibrary.getType(self)",
"function != null"
}, limit = "CACHE_SIZE")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Limit is good.

@hubertp hubertp added the CI: Ready to merge This PR is eligible for automatic merge label May 4, 2023
@mergify mergify bot merged commit 6527312 into develop May 4, 2023
@mergify mergify bot deleted the wip/hubert/6523-fix-test-benchmarks branch May 4, 2023 12:54
Procrat added a commit that referenced this pull request May 4, 2023
…-5075

* develop:
  Build nightly 3 hours earlier. (#6551)
  Cache result of slow function resolution on Any that is present on a hot path (#6536)
  Fix cut-off in text visualisations (#6421)
  Infer correct synthetic name for nested modules (#6525)
  Delete unused websocket dependency (#6535)
  Run typecheck and eslint on `./run lint` (#6314)
  Force pending saves if client closes abruptly (#6514)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test/Benchmarks appear to never finish
3 participants