It looks like when you write a record you are doing it one at a time, this
will take longer. I believe java uses a pointer, fills up a chuck of
memory and then writes the data when the memory is full or almost full.
Try using a pointer for a big chuck of memory, use the pointer to populate
that chuck of memory, once the chuck if full, write the data
Jeff Davis
James Perkins <jrperkinsjr@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/13/2009 01:59 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Service Program Overhead
Alan,
I have written quite a few service programs myself. I've never had a
performance problem before either. The issue WAS some bad code on my that
led me to try the other 2 methods. I fixed the original code and the
performance was more than acceptable.
I'm processing over 240,000 records in about 3.5 minutes. That's not bad
at
all. The only thing I found odd was why it takes less than half the time
in
Java. I'm not trying to day Java performs faster by any means, but maybe
when dealing with files it does. Now, writing the records to a temp table
only took about 30 seconds, so hands down you won't be able to beat that
with Java.
I guess, I might just be reading into all this too much. I just found it
odd
was all. I've never had the need to test any kind of performance like this
at all, it was just some original bad code led me down this path so I
thought maybe I was missing something.
--
James R. Perkins
http://twitter.com/the_jamezp
On Fri, Nov 13, 2009 at 11:28, Alan Campin <alan0307d@xxxxxxxxx> wrote:
At a previous company, I wrote a little test that 10,000,000 calls to a
subprocedure that did almost nothing and that took about 29 seconds. I
tried
with program calls and it was still going at 15 minutes so I killed it.
That
was on an older system. On a power 5 or 6 it would probably be many
times
faster so I would say the overhead of the subprocedure is practically
zero.
I would guess something else is going on. I have written scores and
scores
of service programs and never seen a performance issue.
As an Amazon Associate we earn from qualifying purchases.