Thanks everyone,
Someone had dabbled with our custom compile pgm without telling anyone. A poor programmer spent the whole afternoon yesterday with another colleague trying to debug. I spent another half hour with him this morning before finding the cause of the problem. DSPPGM showed modules fully optimized.
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Scott Klement
Envoyé : mardi 24 février 2009 10:50
À : RPG programming on the IBM i / System i
Objet : Re: CRTRPGMOD
Hello,
I agree with Chamara's interpretation of what the help file said.
Basically, to make the code as fast as possible, the optimizer takes "short cuts" that sometimes cause the debugger to provide incorrect information.
However, my experience is that optimizing makes programs harder to support while providing *no* noticeable performance gain.
Here's my suggestion: Write your programs and compile them normally.
Then, check to see if they perform adequately. If they do, great... if not, then try optimize(*full) and see if it makes any noticeable difference. If it does, great!
But I've been coding in RPG IV for 13 years now, and have run into many situations where performance was unacceptable. But never in all those times, did OPTIMIZE(*FULL) solve the problem. In all cases, I had to find a more efficient way of reading a file, or a more efficient algorithm in my code. It makes little sense to give up serviceability for a 0.001% performance gain. YMMV.
Chamara Withanachchi wrote:
OPTIMIZE(*FULL) generates the most efficient code -- and the compile
process also takes longer. The program should run faster than with
either of the other two options. The debugger will let you see (but
not change) field values; but the debugger may not show you the
correct current field values.
--
This is the RPG programming on the IBM i / System i (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.