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

Find and cache remaining direct method handles #5879

Open
headius opened this issue Sep 16, 2019 · 0 comments

Comments

@headius
Copy link
Member

commented Sep 16, 2019

For #5874, one of the biggest savings in boot time came from caching a number of static method handles, usually acquired via Binder#invokeStaticQuiet. This covered most of the cases switched to using invokedynamic in that PR, but I did not audit other mechanisms for creating direct method handles.

At a minimum, we should audit all places we do the following, and try to cache these handles somewhere for reuse:

  • Binder.invokeStatic (non quiet)
  • Binder.invokeVirtual[Quiet]
  • MethodHandles.Lookup methods for acquiring DMH

With just the work in #5874, I reduced the startup time of non-dev-mode rails -h from 5.2s to 4.6s. We may see similar savings elsewhere, especially in full indy mode, by caching the other DMHs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.