Grails performance issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Grails performance issue

Andrey Z.

Hello.


During request processing i need to load a lot of entities (of two kinds). Maybe 4 or 5 thousands. Most of them are served from 2nd-level cache. The problem is dependency injection which is applied to every domain class killing application performance.


Profiler shows bottleneck is org.codehaus.groovy.grails.plugins.web.api.ControllersDomainBindingApi.autowire which calls GrailsMetaClassUtils.invokeMethodIfExists.


I tried to load entities from Controller and from Service classes. Results are the same.


Is it possible to disable this unnecessary DI feature for particular case or class?


My Grails version is 2.3.11.

Java 1.8

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/3f1a63e7-b538-48a5-9398-8d6a148e3dd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails performance issue

Jeff Brown
On December 27, 2016 at 12:59:00 AM, Andrey Z. ([hidden email]) wrote:
>
>
>
>
> Is it possible to disable this unnecessary *DI* feature for particular case
> or class?
>
>

No, but I think that is a reasonable feature to request.




JSB

--
Jeff Scott Brown
OCI Grails Practice Lead
Principal Software Engineer

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CAEfmkrg4NO%3D5_7Y54R0R6hzLrRPm9aOSB8wGqukSTh1LZCf3Xg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails performance issue

orubel
In reply to this post by Andrey Z.

The ControllersDomainBindingApi.autowire binds the domain of the same name to the controller of the same name (from what I remember). Have you tried building with a regular controller rather than a Grails controller? For example look at how spring boot works; you can always build out your controllers that way. Spring boot works with GORM. Grails urlmapping should still know where to point if I'm guessing correctly.

On Monday, December 26, 2016 at 10:58:50 PM UTC-8, Andrey Z. wrote:

Hello.


During request processing i need to load a lot of entities (of two kinds). Maybe 4 or 5 thousands. Most of them are served from 2nd-level cache. The problem is dependency injection which is applied to every domain class killing application performance.


Profiler shows bottleneck is org.codehaus.groovy.grails.plugins.web.api.ControllersDomainBindingApi.autowire which calls GrailsMetaClassUtils.invokeMethodIfExists.


I tried to load entities from Controller and from Service classes. Results are the same.


Is it possible to disable this unnecessary DI feature for particular case or class?


My Grails version is 2.3.11.

Java 1.8

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/a505dc1d-828b-4676-ba9d-d7bcc00dab39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...