<div dir="ltr"><div class="gmail_default" style="font-size:large">From the performance team perspective we would love to have this activated only if there is a deployment that needs them, that's for sure.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">JSF, Mojarra in particular, has lots of memory problems besides the initialization too, but that's another story that we will start discussing soon.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">This would help our Metaspace memory issues, and we should definitely do this.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">Andy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 2, 2018 at 7:15 PM, Stuart Douglas <span dir="ltr"><<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Everyone,<div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>It also had a significant effect on memory usage, as the parsed TLD's are retained, and are quite large.</div><div><br></div><div>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.</div><div><br></div><div>JSP:</div><div><br></div><div>For JSP I think we can use the following criteria (if either one is satisfied JSP is activated):</div><div><br></div><div>- The presence of a JSP file mapping in web.xml</div><div>- The presence of JSP files inside the deployment</div><div>- The presence of JSF</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>JSF:</div><div><br></div><div>This is much less clear. I think we can use the presence of one of the following:</div><div><br></div><div>- faces-config.xml</div><div>- The faces servlet in web.xml</div><div>- Something else?</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>Does this sound reasonable? </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Stuart</div><div><br></div><div><br></div><div><br></div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/wildfly-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><font size="4">Andrig (Andy) T. Miller<br></font></div><font size="4">Global Platform Director, Middleware<br></font></div><font size="4">Red Hat, Inc.</font><br></div></div></div></div>
</div>