genStrAsCharArray optimisation benefits

Posted by Rich on Stack Overflow See other posts from Stack Overflow or by Rich
Published on 2010-06-15T13:51:29Z Indexed on 2010/06/15 13:52 UTC
Read the original article Hit count: 233

Filed under:
|
|

Hi

I am looking into the options available to me for optimising the performance of JBoss 5.1.0.

One of the options I am looking at is setting genStrAsCharArray to true in <JBOSS_HOME>/server/<PROFILE>/deployers/jbossweb.deployer/web.xml. This affects the generation of .java code from .JSPs.

The comment describes this flag as:

Should text strings be generated as char arrays, to improve performance in some cases?

I have a few questions about this.

  1. Is this the generation of Strings in the dynamic parts of the JSP page (ie each time the page is called) or is it the generation of Strings in the static parts (ie when the .java is built from the JSP)?
  2. "in some cases" - which cases are these? What are the situations where the performance is worse?
  3. Does this speed up the generation of the .java, the compilation of the .class or the execution of the .class?
  4. At a more technical level (and the answer to this will probably depend on the answer to part 1), why can the use of char arrays improve performance?

Thanks in advance

Rich

© Stack Overflow or respective owner

Related posts about optimization

Related posts about jsp