[wildfly-dev] JSF and JSP activation
Stuart Douglas
stuart.w.douglas at gmail.com
Mon Apr 2 21:15:58 EDT 2018
Hi Everyone,
At the moment JSP and JSF are being activated for all web deployments,
which is relatively expensive as this involves quite a bit of class loading
and TLD parsing.
To give an idea about how much time this is actually taking I did a test
with a large number of small servlet only deployments both with and without
JSF, and JSF was accounting for 20% of total deployment time even though it
was not actually used by any of the deployments.
It also had a significant effect on memory usage, as the parsed TLD's are
retained, and are quite large.
The root of this issue is that the spec does not define clear activation
criteria for these technologies. I am proposing that we formalise some
activation criteria, so that we can avoid activating them if they are not
required.
JSP:
For JSP I think we can use the following criteria (if either one is
satisfied JSP is activated):
- The presence of a JSP file mapping in web.xml
- The presence of JSP files inside the deployment
- The presence of JSF
One thing that does concern me is that searching for JSP files in this way
may be expensive in large deployments with lots of web resources. An
alternate approach may be to try and make JSP lazy, so class loading and
TLD passing does not happen until a request for a JSP file arrives.
JSF:
This is much less clear. I think we can use the presence of one of the
following:
- faces-config.xml
- The faces servlet in web.xml
- Something else?
I am not really sure what effect this will have on backwards compatibility
though. If this is a compatibility problem we could add an attribute to the
JSF subsystem to restore the old mode.
Does this sound reasonable?
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20180403/56261895/attachment.html
More information about the wildfly-dev
mailing list