Another area that I'm noticing that Tomcat is spending a LOT of time in
is with character encoding. Its not a ton of time but its really
showing up as one of the top 20 areas of our webapp.
Internally its either storing text as a java.lang.String or with
genStrAsCharArray ... a char array
Clark O'Brien wrote:
Can someone provide insight on the adverse affects of
invoking sleep() from a servlet. I understand that the
J2EE explicitly forbids invoking sleep from within a
servlet and it is not hard to figure out this could
cause problems given that a single tomcat thread may
Dakota Jack wrote:
You have to be and are comparing apples and oranges, Kevin,
Perhaps... but my point was that JSP 2.0 doesn't HAVE to be this slow! :)
because
JSP *is* Java. DOH! It cannot run slower than what it is.
No.. it could run slower... I'm sure the Tomcat developers will
Peng Tuck Kwok wrote:
Just to check are your precompiling the jsp page?
Yes... we're precompiling them before we deploy. I'd recommend most
people do that if they have the time.
Kevin
--
Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com.
See irc.freenode.net #rojo if you want
Remy Maucherat wrote:
For production configuration for Jasper, see:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Production%20Configuration
Cool... we have those set but I didn't see *genStrAsCharArray
*
**The interesting thing is that jprofiler clearly shows a big
Peter Lin wrote:
Back in 2002, I wrote several pages using JSP + java and JSP + JSTL to
measure the actual cost of from a performance perspective. The
performance difference isn't noticeable if a page has less than 50
tags. With 200+ tags, the performance difference does range from 2-5x
slower
Remy Maucherat wrote:
It will obviously use more CPU and make more API calls. However, it
does not allocate any objects, but instead will reuse per page objects
(which is very fast). So overall, it sounds weird to me that the
bottleneck would be on tag invocation.
In the end, it's hard to beat
Remy Maucherat wrote:
For production configuration for Jasper, see:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Production%20Configuration
Do you know offhand if genStrAsCharArray has to be passed to jspc? I
didn't notice this as one of the command line options in
So on:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Production%20Configuration
It recommends to use genStrAsCharArray when in production.
This can be set in web.xml but not when using JspC from the command line.
trimSpaces is there... but not genStrAsCharArray.
Its in
This is another smaller issue.
c:set var=foo value=bar/
yields:
_jspx_th_c_set_0.setValue(new String(bar));
If this is a constant string why does it need to continually call new
String(bar) here?
This is just going to waste CPU and cause more garbage to be generated
which the GC
I've been tuning our application trying to get the maximum performance
out if the system as possible.
I've been throwing the system at jprofiler and allowing it to tell me
where to optimized.
In short Tomcat is slower than our DB, filesystem,. network and all
other systems by about 4x.
Dakota Jack wrote:
Why would you have to have an entirely new reflection for more than
one database call? That sound like a design SNAFU to me. Looks to me
like you should be having one use of reflection instead of 1000.
I don't have to have it. Tomcat is *doing* it. Forget the DB. If I
Tim Funk wrote:
Its not reflection killing you. For example, time this:
%=System.currentTimeMillis()%
c:forEach begin='0' end='${param.iterations}'
${more.cowbell}
/c:forEach
%=System.currentTimeMillis()%
Where more is any java object and cowbell is a property
(getCowbell()). In simple timing
QM wrote:
On Mon, Apr 18, 2005 at 02:19:15PM -0700, Kevin Burton wrote:
: So its clearly not JUST reflected methods its something else on top of
: it
What does your profiler report?
-QM
I can't for the life of me figure it out!
It certainly reports that doTag is taking a LOT of time
Dakota Jack wrote:
Why don't you break it down and find out where the time is going?
So in summary.. now that I'm suspicious that its a tag instantiation
issue I'm going to load up the webapp with FULL instrumentation... its
about 8x slower but I think I'll need that level of granularity
I've been spending this week running a profiler across our webapp and
Tomcat.
We've had a few bottlenecks in our code that have since been removed but
the remaining big bottleneck is Tomcat. The JSP engine is creating
compiled code that is heavily relying on reflection. Reflection
shouldn't
QM wrote:
On Sun, Apr 17, 2005 at 03:44:59PM -0700, Kevin Burton wrote:
: We've had a few bottlenecks in our code that have since been removed but
: the remaining big bottleneck is Tomcat. The JSP engine is creating
: compiled code that is heavily relying on reflection.
: [snip
Dakota Jack wrote:
1000 on a page? Really? That seems very odd to me given my
experience. What would a page like that look like? Do you have
examples?
So psuedo code...
- get a list of objects from your DB.. Say 500
- for each object
tag A
tag B
tag C
fn:length
And so forth...
18 matches
Mail list logo