Grails
  1. Grails
  2. GRAILS-7169

GroovyPagesTemplateEngine.createTemplate(String text, String pagename) never caches generated GSP

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.3.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Following on from GRAILS-6573, there was no "cacheable" method override added for the createTemplate(String text, String pagename) variant.

      As a result any literal templates can never be cached and result in new compile and permgen usage (but not leakage necessarily).

        Issue Links

          Activity

          Hide
          Lari Hotari added a comment -

          quoting http://jira.codehaus.org/browse/GRAILS-6571?focusedCommentId=230739&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_230739

          Looks like issue of PermGen space leak is resolved.

          I have added call to "findOrInitGroovyClassLoader().clearCache();" from "GroovyPagesTemplateEngine .buildPageMetaInfo(InputStream inputStream, Resource res, String pageName) " method.

          GroovyClassLoader.clearCache() is never called (https://github.com/grails/grails-core/blob/1.3.x/src/java/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngine.java) so there probably is a permgen leak.

          Show
          Lari Hotari added a comment - quoting http://jira.codehaus.org/browse/GRAILS-6571?focusedCommentId=230739&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_230739 Looks like issue of PermGen space leak is resolved. I have added call to "findOrInitGroovyClassLoader().clearCache();" from "GroovyPagesTemplateEngine .buildPageMetaInfo(InputStream inputStream, Resource res, String pageName) " method. GroovyClassLoader.clearCache() is never called ( https://github.com/grails/grails-core/blob/1.3.x/src/java/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngine.java ) so there probably is a permgen leak.
          Show
          Lari Hotari added a comment - Mailing list thread http://grails.1312388.n4.nabble.com/GroovyPagesTemplateEngine-GSP-related-re-design-needed-td3215501.html for re-design , comments on GRAILS-5560
          Hide
          Graeme Rocher added a comment -

          duplicates GRAILS-5560

          Show
          Graeme Rocher added a comment - duplicates GRAILS-5560

            People

            • Assignee:
              Unassigned
              Reporter:
              Marc Palmer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development