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 method_missing target #5978

Merged
merged 1 commit into from Dec 2, 2019
Merged

Cache method_missing target #5978

merged 1 commit into from Dec 2, 2019

Conversation

headius
Copy link
Member

@headius headius commented Nov 22, 2019

This logic will cache the target class's method_missing impl when
a method call fails to find a natural method table entry. This
scenario was a source of failed call sites in Redmine's json
builder and in the Rails StringInquirer class used for Rails.env.
With this change in place Redmine json issue requests improved by
roughly 15%.

This logic will cache the target class's method_missing impl when
a method call fails to find a natural method table entry. This
scenario was a source of failed call sites in Redmine's json
builder and in the Rails StringInquirer class used for Rails.env.
With this change in place Redmine json issue requests improved by
roughly 15%.
@headius
Copy link
Member Author

headius commented Nov 22, 2019

Note that this caching is still doing an indirect call, via DynamicMethod#call. There's an additional opportunity here by specializing the bound target and making it possible to inline method_missing.

@headius headius added this to the JRuby 9.2.10.0 milestone Nov 26, 2019
@headius
Copy link
Member Author

headius commented Nov 26, 2019

I did not expect it to pass, but that's great!

@headius headius merged commit 463f9a9 into jruby:master Dec 2, 2019
5 checks passed
@headius headius deleted the cache_m_m branch Dec 2, 2019
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.

None yet

1 participant