Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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
-
JRUBY-4246
Excessive, repetitive, or unnecessary setAccessible calls could impact performance
-
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.
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.