× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Java and CPU (servlet and RPG/CGI speed compare)
  • From: "Bruce Jin" <brucej@xxxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 2 Mar 2001 11:07:35 -0600

I try to find out which one runs fast, servlet or RPG/CGI?

I wrote a RPG/CGI and a servlet. They display exactly the same data
retrieved dynamically from AS400. Then I wrote a java application to request
the CGI/servlet consecutively from my PC  (using URL API in LAN connection)

50 consecutive requests to CGI yields an average response time of 0.21
second per request

50 consecutive requests to servlet yields an average response time of 0.11
second per request

This is a bit surprising to me. I was expecting the servlet to be slower
than RPG/CGI due to the jdbc connection and java code execution speed. It
appears that both jdbc and java execution have greatly improved with V4R5.

Both RPG and servlet pages are similar to this:
http://www.crazybikes.com/I00090gc.mrc except in my tests I have 10 rows per
table instead of 5. The AS400 is a 270.

Bruce



-----Original Message-----
From: Larry Loen <lwloen@us.ibm.com>
To: JAVA400-L@midrange.com <JAVA400-L@midrange.com>
Date: Friday, March 02, 2001 8:44 AM
Subject: RE: Java and CPU



>Servlets can beat CGI in several circumstances, because it
>is basically firing up a waiting native thread instead of the potential
>for creating a new job, creating a new activation, etc. that can
>be part and parcel of running CGI.
>
>And, throw enough SQL DB in the mix or enough back-end RPG
>processing on the other end of a data queue or something,
>and you won't be able to tell which approach is faster,
>because the back end work will drown out the rest.
>
>Someone had a nice COMMON presentation explaining all
>this.
>
>Now, I'm not going to argue whether Java is faster, on average,
>than RPG.  I will tell you that when RPG is faster, it is not because
>the codegen quality is better for RPG; it has to do with how RPG invokes
>OS/400 services to advantage, which it was built to do (whereas
>Java uses only very generic interfaces).
>
>
>
>Larry W. Loen  -   Senior Java and AS/400 Performance Analyst
>                          Dept HP4, Rochester MN
>
>
>+---
>| This is the JAVA/400 Mailing List!
>| To submit a new message, send your mail to JAVA400-L@midrange.com.
>| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
>| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner: joe@zappie.net
>+---

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.