Tomcat version 6.0.16 trunk (and earlier) PageContextImpl.java has: public static Object proprietaryEvaluate() that does a: final ExpressionFactory exprFactory = JspFactory.getDefaultFactory().get JspApplicationContext(pageContext.getServletContext()).getExpressionFactory(); Our benchmarking of pages using large amounts of EL-expression shows this turns into a bottleneck due to the fact that JspFactory.getDefaultFactory() is synchronized. The bug is very similar to bug #41558 I have a patch that fixes the issue, coming up...
Created attachment 21515 [details] Patch to avoid calling synchronized method every EL evaluation The attached patch fixes the performance problem by calling the synchronized method only once.
This has been fixed in trunk and proposed for 6.0.x.
This has been applied to svn for 6.0.x and will be in 6.0.17 onwards.
Hi Robert, I find that this similar bug can be found in other Apache projects: ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java line:86 ./tiles-2.2.2/src/tiles-el/src/main/java/org/apache/tiles/el/JspExpressionFactoryFactory.java line:61 (In reply to comment #0) > Tomcat version 6.0.16 trunk (and earlier) > > PageContextImpl.java has: > public static Object proprietaryEvaluate() > that does a: > final ExpressionFactory exprFactory = JspFactory.getDefaultFactory().get > JspApplicationContext(pageContext.getServletContext()).getExpressionFactory(); > > Our benchmarking of pages using large amounts of EL-expression shows this turns > into a bottleneck due to the fact that JspFactory.getDefaultFactory() is > synchronized. > > The bug is very similar to bug #41558 > > I have a patch that fixes the issue, coming up...