Community
Participate
Working Groups
While profiling EDT with YourKit, I noticed that the method AbstractVisitor::primGetMethod was taking a significant amount of time. I believe this method takes so long because of the large number of MethodNotFound exceptions being thrown. To resolve this issue, I changed the method to: private Method primGetMethod(String methodName, Class<?> clazz) { Method method = null; try { Method[] methods = this.getClass().getMethods(); for (Method nextMethod : methods) { if(nextMethod.getName().equals(methodName)){ if(nextMethod.getParameterTypes().length == 1){ if(nextMethod.getParameterTypes()[0].equals(clazz)){ method = nextMethod; break; } } } } } catch (SecurityException e) { throw new RuntimeException(e); } return method; } In my runtime workspace, the generation time for 1 project went from 12 minutes to 3 minutes with this change.
I have committed and released your proposed change.
This defect was fixed at least 2 months ago, so I am closing.