× 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.



In my experience, the low-hanging fruit is in the design.
-A program that no longer needs to run as often, or at all, is by far the biggest improvement.
-Filtering by most restrictive element first instead of least restrictive (Select by height, hair color, gender instead of gender, hair color, height.)
-If all of the records in a file are to be processed anyway, take the K off the F-spec for that file.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, January 03, 2013 12:44 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Suggestions on Speeding up a program

On 1/3/2013 9:43 AM, RPGLIST wrote:
I'm looking for any and all suggestions on possible ways to speed up
some programs.

The typical ones that come to mind are:

1. avoiding open and closes on files
2. Not setting LR when calling a program or procedure multiple times
3. using Data structures for block reads and writes

Any other suggestions?

Random poking is the least efficient way of improving performance.
Measure, measure, measure and then you know where the low performing areas are.

In my experience, the number one bottleneck is I/O. Typically, we do way too much of it. Imagine a customer master file with 50 columns, 500 total bytes long. Our RPG program does a CHAIN to get the customer's name and address. The database needs to shuffle all 500 bytes to the RPG buffer, which in turn needs to map 50 columns to 50 fields. We actually need a quarter of the bytes and only 5 fields. And we do that CHAIN for every one of a million transactions. That's a lot of bytes to copy and discard and a lot of fields to map and ignore because someone in 1986 thought it was a bad idea to make a logical file containing only name and address.

But measure it! It could be anything, including a giant sized return value from a function call.

Have a look at iDoctor. https://www-912.ibm.com/i_dir/idoctor.nsf
--buck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.