optimization - genStrAsCharArray optimisation benefits -
I'm looking at the options available to me to optimize the performance of Zebaus 5.1.0.
One option I see is from gene STA
to true
in & lt; JBOSS_HOME & gt; / Server / & lt; PROFILE & gt; Setting /deployers/jbossweb.deployer/web.xml
. This affects the generation of .jps .jpg.
The comment describes this flag as:
Should the text strings be prepared as four arrays, some cases to improve performance?
I have some questions about it.
- Is it the generation of strings in dynamic parts of the JSP page (i.e. the page is called every time) or is it the generation of strings in static parts (i.e. when java made from jsp has gone)?
- "In some cases" - what are these cases? What are the situations where performance is bad?
- Does Java's generation increase, class compilation or class execution?
- At a more technical level (and the answer will probably depend on the answer to 1 part), why can the use of four arrays improve performance?
Thank you in advance
The string
value with this setting is Fixed four []
as follows:
Fixed four [] _char_array_1 = "someString" To charare ();
is used as follows:
Out. Written (_char_array_1);
Instead of using it in the way:
outside.write ("some string");
There are two obvious advantages:
- In a
char []
instring .
toCharArray ()
is not required to call everyout.write (string)
.
Looks like microprimimization, but a lot of those small bits are visited on the heavily visited website.
This setting is not specific to JBS AS, it is specific, the JSP compiler of ApacheTomac, which is also used under every JBS AS and Sun Glassfish.
Comments
Post a Comment