Foros de discusión

Performance - 50% of web.xml is about defining filters

thumbnail
Raja Nagendra Kumar, modificado hace 13 años.

Performance - 50% of web.xml is about defining filters

Expert Mensajes: 484 Fecha de incorporación: 2/03/06 Mensajes recientes
Hi,

In 6.0.5 (may be earlier ones too), we observe that of 1530 lines in web.xml there are close to 700 lines are about definitions for various filters.

Such many filters can be really really painful to maintain and can lead to performance issues very easily.

Is there a simpler version of web.xml so that for a mid sized company and in production environment with high need for performance, we can simply use such web.xml.

I am sure, some one much have already stripped web.xml this way, as many of filters may be irrelevant to most users.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
thumbnail
prakash harigopal, modificado hace 13 años.

RE: Performance - 50% of web.xml is about defining filters

Regular Member Mensajes: 101 Fecha de incorporación: 23/06/10 Mensajes recientes
Hi Rajendra,

When you are using LR SDK it appends only the following list of filters.
I dont think these will disturb or reduce the performance of application. Apart from this LR will try to append the portlets and servlets and TAG lib in web.xml .

Can you tell me if you are seeing any other filters apart from this list.


<filter>
<filter-name>Ignore Filter - FTL</filter-name>
<filter-class>com.liferay.portal.kernel.servlet.PortalClassLoaderFilter</filter-class>
<init-param>
<param-name>filter-class</param-name>
<param-value>com.liferay.portal.servlet.filters.ignore.IgnoreFilter</param-value>
</init-param>
</filter>
<filter>
<filter-name>Ignore Filter - JSPF</filter-name>
<filter-class>com.liferay.portal.kernel.servlet.PortalClassLoaderFilter</filter-class>
<init-param>
<param-name>filter-class</param-name>
<param-value>com.liferay.portal.servlet.filters.ignore.IgnoreFilter</param-value>
</init-param>
</filter>
<filter>
<filter-name>Ignore Filter - VM</filter-name>
<filter-class>com.liferay.portal.kernel.servlet.PortalClassLoaderFilter</filter-class>
<init-param>
<param-name>filter-class</param-name>
<param-value>com.liferay.portal.servlet.filters.ignore.IgnoreFilter</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Ignore Filter - FTL</filter-name>
<url-pattern>*.ftl</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Ignore Filter - JSPF</filter-name>
<url-pattern>*.jspf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Ignore Filter - VM</filter-name>
<url-pattern>*.vm</url-pattern>
</filter-mapping>
thumbnail
Raja Nagendra Kumar, modificado hace 13 años.

RE: Performance - 50% of web.xml is about defining filters

Expert Mensajes: 484 Fecha de incorporación: 2/03/06 Mensajes recientes
Hi Prakash,

web.xml (xxx\lr\6.0.5\liferay\tomcat-6.0.26\webapps\ROOT\WEB-INF\web.xml) I was referring is the one which exists in ROOT webapp of tomcat install of Liferay.

I have really not made any performance measurements but certainly due to filters definition as applied to regular expression based URL patterns can really mean lot more pre-processing time spent by servers before it really reaches to business portlets. I understand these filters would be needed if some one is using full functionality of liferay.

e.g I see some thing as Sharepoint Filter which gets applied to /* or many such things may do nothing in most of the mid size companies needs. Similarly URL rewriting filter.. by default it says it is disabled.. but now sure if it still consumes some cycles due filter mappings.

Regards,
Raja Nagendra Kumar