-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Load/require logic lacks path caching and indexing found in MRI #2794
Comments
shows two non-existing directories on the default load_path (only one for jruby-1.7.x). this index should take into account that load_path entries do not exist ?! |
What the...ok, those aren't even valid paths. Something's off. |
Oops, I thought the true/false were part of the path. But yeah, there's no reason to add paths that don't even exist. |
Circling back to the two non-existent paths: site_ruby turns out to be very important, as RubyGems uses it to know where to insert gem libs into the load path. Whether it exists or not, we need it there for RG. The other path was our old "shared" stdlib dir that doesn't exist now, so I removed it. |
I'm also seeing a lot of this when I run with -d... I think we've got some problems with circular require logic or we're simply warning too much:
|
This was not supposed to be closed. Bad commit. |
From #408, the original MRI bug for this feature was in http://bugs.ruby-lang.org/issues/5767 |
The pain...the pain of reading CRuby code. But this is close. PR coming soon. |
Work continues on this but it will move to 9.2.8. The basic caching logic has been translated from MRI but it's poorly-adapted to Java and JRuby. I will rewrite it before submitting a PR. |
Most of this logic was "ported" in #5764. There may be additional improvements possible. |
MRI has a number of caches and indexes that improve the performance of load/require searching. We lack most of those caches, or have poor implementations of them.
The two key bits I know of:
We need to implement our loading logic so that it performs similar mappings, both to improve lookup performance and to better match MRI behavior with regards to full paths.
This may push to post-9k since it does not fix any known compatibility issues.
The text was updated successfully, but these errors were encountered: