jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-4294

JavaClass.java is calling setAccessible too much

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: JRuby 1.4
  • Fix Version/s: JRuby 1.5
  • Component/s: Core Classes/Modules
  • Labels:
    None

Description

The JRuby runtime will spin-up faster without these setAccessible calls.

// called only by initializing thread; no synchronization required
        void addMethod(Method method, Class<?> javaClass) {
            if (methods == null) {
                methods = new ArrayList<Method>(4);
            }
          /////////////////////////////////////////////
          //
          //  THIS IS TOO EXPENSIVE
          //
          //  if (!Ruby.isSecurityRestricted()) {
          //      try {
          //          method.setAccessible(true);
          //      } catch(SecurityException e) {}
          //  }
          //
          /////////////////////////////////////////////
            methods.add(method);
            haveLocalMethod |= javaClass == method.getDeclaringClass();
        }

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. JRUBY-4246 Excessive, repetitive, or unnecessary setAccessible calls could impact performance

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vladimir Sizikov added a comment - 02/Dec/09 2:47 AM

I don't see any measurable difference between original version and version with setAccessible() commented out. Is this observed in "special" environments, as noted in the JRUBY-4246?

At any rate, it seems that these two bugs are exactly about the same, right? We may then close one of them as duplicate.

Show
Vladimir Sizikov added a comment - 02/Dec/09 2:47 AM I don't see any measurable difference between original version and version with setAccessible() commented out. Is this observed in "special" environments, as noted in the JRUBY-4246? At any rate, it seems that these two bugs are exactly about the same, right? We may then close one of them as duplicate.
Hide
Permalink
Thomas E Enebo added a comment - 17/Dec/09 1:22 PM

Resolving as duplicate since this appears to be the same bug VVSiz mentions in the last comment.

Show
Thomas E Enebo added a comment - 17/Dec/09 1:22 PM Resolving as duplicate since this appears to be the same bug VVSiz mentions in the last comment.

People

  • Assignee:
    Thomas E Enebo
    Reporter:
    John Woodell
Vote (0)
Watch (1)

Dates

  • Created:
    01/Dec/09 11:22 PM
    Updated:
    09/Feb/11 12:20 PM
    Resolved:
    17/Dec/09 1:22 PM

Time Tracking

Estimated:
30m
Original Estimate - 30 minutes
Remaining:
30m
Remaining Estimate - 30 minutes
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.