Class and module names could be cached
--------------------------------------

                 Key: JRUBY-6218
                 URL: https://jira.codehaus.org/browse/JRUBY-6218
             Project: JRuby
          Issue Type: Improvement
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.7
            Reporter: Charles Oliver Nutter
            Priority: Minor


During the 1.7 dev cycle, I removed caching of module and class names due to 
the complexity of supporting their updates when classes and modules enclosing 
them have their names updated. Specifically, I could not find an efficient way 
for a class contained within an anonymous class to get a new, non-anonymous 
name when the anonymous container gains a name later on.

As a result, the performance of Class#name and Module#name has degraded in the 
1.7 dev branch (master).

We could potentially still compensate for this degradation with a new form of 
caching. I have made such an attempt and posted it here: 
https://gist.github.com/1372628

I use the constant cache invalidation as a way to know that somewhere, some 
name has been updated. It does not pass tests, but I think it's possible for us 
to fix it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to