Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-M2
-
Fix Version/s: 2.0-RC1
-
Component/s: None
-
Labels:None
Description
GormStaticApi.methodMissing gets called for every invocation at least for some finders.
One of the methods is with the signature "DomainClass.findByPropertyName(Long value)".
The code in GormStaticApi.methodMissing that registers the metamethod to the metaclass has no effect:
// register the method invocation for next time synchronized(this) { mc.static."$methodName" = { List varArgs -> method.invoke(cls, methodName, varArgs) } }
In a performance test of one of our real Grails projects, YJP shows that significant amount of time (about 20%) is spent in this method.
Issue Links
- is related to
-
GRAILS-9044
FilterConfig.methodMissing gets called for every invocation when calling a method with several arguments
-
Perhaps "List varArgs" should be "Object[] varArgs"? See http://groovy.codehaus.org/Using+methodMissing+and+propertyMissing .