Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.2.2
    • Fix Version/s: 6.0.0 Preview
    • Component/s: None
    • Labels:
      None
    • Environment:
      WAR distribution loaded on Tomcat 5.x

      Description

      I noticed very poor performance when setting up a new Liferay instance on the 5.2.2 release. After a little investigation with Firebug, I tracked it down to repeated downloads of barebones.jsp and everything.jsp (in the case of logged on users). These files are fairly large and should normally get cached, because they do not change.

      This seems to be a problem with the web.xml file. While the "Minifier Filter - CSS JSP" correctly treats barebone, everything, and css jsps as static content, the "Header Filter - CSS JSP" and "Cache Filter - Resource CSS JSP" are only configured to treat *.css.jsp as static content.

      The fix is to update the hedaer and cache filters in web.xml to include barebone.jsp and everything.jsp:
      <filter>
      <filter-name>Cache Filter - Resource CSS JSP</filter-name>
      <filter-class>com.liferay.portal.servlet.filters.cache.CacheFilter</filter-class>
      <init-param>
      <param-name>url-regex-pattern</param-name>
      — <param-value>.+/css\.jsp</param-value>
      +++ <param-value>.+/(barebone|css|everything)\.jsp</param-value>
      </init-param>
      <init-param>
      <param-name>pattern</param-name>
      <param-value>2</param-value>
      </init-param>
      </filter>
      <filter>
      <filter-name>Header Filter - CSS JSP</filter-name>
      <filter-class>com.liferay.portal.servlet.filters.header.HeaderFilter</filter-class>
      <init-param>
      <param-name>url-regex-pattern</param-name>
      — <param-value>.+/css\.jsp</param-value>
      +++ <param-value>.+/(barebone|css|everything)\.jsp</param-value>
      </init-param>
      <init-param>
      <param-name>Cache-Control</param-name>
      <param-value>max-age=315360000, public</param-value>
      </init-param>
      <init-param>
      <param-name>Expires</param-name>
      <param-value>315360000</param-value>
      </init-param>
      </filter>

      After making these changes, the portal performance was dramatically improved. I hope this helps fix the issue for others.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 1 week, 6 days ago

                Subcomponents