× 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: CALLP vs CALLB vs EXSR and web server performance
  • From: "David Shea" <dshea@xxxxxxxxxxxx>
  • Date: Tue, 1 Feb 2000 21:28:54 -0500
  • Importance: Normal

I am posting the following message as a follow up to a thread on CALLP vs
CALLB.  I had posted the original message a couple weeks ago and got a
response from Barbara.  I then emailed her directly with a long winded
follow up.  She answered the question and asked that I post the results on
the list for the benefit of all...

So... here it is, and many thanks to Barbara and all the others of you out
there that have come to my rescue...

I apologize for the length of this single message, but it encompasses the
entire thread (so start reading from the bottom....)

-----Original Message-----
From:   <bmorris@ca.ibm.com>
To:     <dshea@arctools.com>
Sent:   Wednesday, January 26, 2000 10:56 AM
Subject:        Re: CALLP vs CALLB vs EXSR

> I'll tell you what's going on:
>
> CALLP can call a program or a procedure.  It stands for Call with
> prototype.  By changing to CALLB, you made the same change as changing the
> prototype from EXTPGM to EXTPROC.  The change from dynamic program call to
> bound call does explain the difference in performance, but you can get the
> performance improvement PLUS the benefits of prototyped calls by just
> changing EXTPPGM to EXTPROC, and then binding the modules the way you
have.
>
> I agree that you should continue with the bound calls and find the bug.  I
> don't know why the bug should only show up with bound calls, though ...
>
> Barbara
>
>
>
> To:   Barbara Morris/Toronto/IBM@IBMCA
> cc:
> Subject:      Re: CALLP vs CALLB vs EXSR
>
> Barbara:
>
> Part of the mystery with the scenario I described has to do with the fact
> that I don't really know what I'm doing... let me explain.
>
> A buddy of mine is assembling a web site on my AS400.  He was complaining
> about response time.  I know a little RPG (I was a mainframe IMS, Cobol
and
> JCL jockey in my programming days).  I looked at his code.  It's a
> collection of little programs - a driver, one that creates the left bar,
> one
> for the right bar, one for the top, one for the bottom.  I get the feeling
> it's a shell that he got from some training course.  Anyway, it's written
> in
> ILE-RPG.  I'm somewhat familiar with RPG3 and 4 but not so much ILE.  I
was
> curious about CALLP and CALLB.  In my mainframe days, we used to compile a
> program then LINK it together with it's other modules.  The alleged
purpose
> of this was to enhance performance, as all the needed programs were then
> congealed into one loadable module.  This cut down on disk i/o and paging.
> So, I tell myself, callB... B??? Bind??? Sort of like LINKing???  I
> dunno...
> let's try it.  I copied his code to my library, changed whatever callp's
> would survive the trip to callB's (apparently this only works for other
RPG
> modules), compiled the modules, then did a CRTPGM on them, allegedly
> glue-ing them all together.
>
> His original programs took forever to execute, and watching them run with
> WRKACT JOB showed cpu %'s of 80% for the duration of the execution.  Mine,
> on the other hand, ran in less than half the time.  I don't know just why.
>
> One curiousity out of the stuff that I compiled is that the 'right bar'
> gets
> doubled up and the 'bottom bar' doesn't appear.  A quick look at his code
> tells me that some indicator or parameter that controls the calling of the
> 'bottom bar' program is not getting set right, so the right bar gets
> doubled
> and the bottom gets forgotten.  There is an indicator controlling the call
> to the bottom bar program...
>
> I passed my observations back to the original programmer, who>  said they
tried callB's and got 'unpredictable' results like what I > was seeing.  My
conclusion is that he's got a code problem causing the
> 'unpredictability', not the CALLB.
>
> So anyway, the difference is either due to 'Bottom Bar' not getting
> executed, or the CALLB's or something else I did differently, or some
> combination of all the above.
>
> What do you think???  I find this very curious, but I'm not going to kill
> myself over it, since it's not my problem... but I do like a challenge.
At
> least I don't know what I'm doing, so I just might learn something.
>
> My gut tells me to go with CALLB's and find the bug!
>
> Thanks for your time and effort on this.  Your thoughts are appreciated.
>
> DAVE SHEA
>
>
> ----- Original Message -----
> From: <bmorris@ca.ibm.com>
> To:   <RPG400-L@midrange.com>
> Sent: Friday, January 21, 2000 2:51 PM
> Subject:      Re: CALLP vs CALLB vs EXSR
>
> >
> > > From:     "David Shea" <dshea@arctools.com>
> > > Sent:     Friday, January 21, 2000 12:16 PM
> > >
> > >I did some tinkering with CALLB vs CALLP related to a web application.
> > All
> > >I can tell you is before, using CALLP, the response time to get the
page
> > up
> > >was 15 seconds or more.  After changing to CALLB, response time dropped
> to
> > 5
> > >seconds or less.  I don't know just what the he*& was going on with the
> > >difference between callp and callb, but it sure made a HUGE
improvement.
> >
> > I was surprised to see this thread.  I am unaware of any reason for such
> > a difference between CALLP and CALLB, since both just load up the
> > paramters,
> > mess with the PSDS a bit, make the call, and mess with the PSDS a bit
> more.
> >
> > So I tried a little test where I passed 10 parameters by reference
> > (required
> > for CALLB) using CALLB and CALLP to the same two external procedures.
> The
> > times to do 10,000,000 calls were:
> >    CALLB to prototyped subproc:  64.06  seconds
> >    CALLP to prototyped subproc:  64.26  seconds
> >
> >    CALLB to non-prototyped proc: 82.00  seconds
> >    CALLP to non-prototyped proc: 81.82  seconds
> > (The non-prototyped proc was an RPG main that just did a return, without
> > setting on LR.)
> >
> > Not enough difference here between CALLB and CALLP to be significant, I
> > don't think, especially since CALLB is a bit faster in one scenario and
> > a bit slower in the other.  My test does show that a non-prototyped
> > procedure runs slower than a prototyped subprocedure, though.  This is
> > not surprising.
> >
> > Back to the 15 seconds for CALLP vs 5 seconds for CALLB case ...
> >
> > When you switched from CALLP to CALLB, did you have to make any changes
> to
> > the parameters on the call?  The only thing I can think of that could
> > cause such a significant difference is if you had some expressions for
> > some of the CALLP parms that you had to save in temporaries for CALLB.
> >
> > Barbara Morris
> >

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


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.