without more details about what the CGI and servlets do, it's going to
be really hard for others to say how to improve or fix the performance.

If you're doing tons of regexp in your CGI to do string templating, then
the answer if obvious. perl regexp is screaming fast and trying to do
string parsing in a servlet is not what it was designed to do. On the
otherhand, if you parse the string into objects to do your manipulation,
then servlets have a chance of competing and out performing.

changing from PERL to servlet isn't as simple as "do exactly what i did
in perl, but with java syntax."

I know first hand what happens when someone decides to use PERL
templating techniques an a servlet. It crawls. The solution was to use
an object oriented approach.

good luck.

peter

Aryeh Katz wrote:
> 
> I have an apache module that interacts with the cgi environment (even going
> as far as exec'ing a cgi), and I just migrated this to a servlet in the hopes of
> improving performance.
> Unfortunately, using ab to benchmark, the cgi won hands down. Performance
> in the servlet was 10 times worse (assuming 10 concurrent requests). This
> was also true when I requested the servlet from tomcat directly, although
> there was a SLIGHT improvement (only 6 times worse)
> 
> And yes, I am using some synchronized methods, but they should be very
> fast (if (val != null) return; else myval = val).
> 
> No database calls here, just simple cgi processing to render a page. Does
> anyone have any thoughts on how/where to look in improving the servlet's
> performance?
> I am using apache 1.3.27, with mod_jk 1.2.1 beta, and tomcat 4.0.6.
> ---
> Aryeh Katz
> VASCO
> www.vasco.com
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to