-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Grails issue #12460 #257
Conversation
Use BeanClassLoaderAware, no need to set classLoader property declaratively.
Shouldn't |
@darxriggs you're right, see another PR #258 |
@@ -202,7 +202,7 @@ class GroovyPagesGrailsPlugin extends Plugin { | |||
|
|||
// Setup the main templateEngine used to render GSPs | |||
groovyPagesTemplateEngine(GroovyPagesTemplateEngine) { bean -> | |||
classLoader = ref("classLoader") | |||
bean.lazyInit = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change of lazyInit
related to the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. gspTagLibraryLookup is very time consuming, it is lazy, so I add too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my test, the lazy-init doesn't have a noticeable effect, I can remove it currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a method to optimize gspTagLibraryLookup
, this will greatly reduce initialization time.
@@ -201,14 +201,6 @@ public void setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver) { | |||
this.jspTagLibraryResolver = jspTagLibraryResolver; | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason to remove the setter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The discussion started here in spring-framework and this answer should shed some light on this.
@puneetbehl will this be merged to 5.2.x? |
Use BeanClassLoaderAware, no need to set classLoader property declaratively.
See grails/grails-core#12460