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



Come on, we are talking about 47 nano-seconds compared with 4 nano-seconds.

Could it be - the file opens when the program is started and stays open,
the dataarea probably don't.

On Sat, Apr 22, 2017 at 12:19 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:

I'm surprised that the difference is that big, but not that surprised that
it is slower.

The database has been reworked many times over the years and made more and
more efficient. I suspect that data areas have not really changed. Chuck
Pence may have a better idea but it seems to me that there was not the
pressing need to improve their performance compared with the database.

If you really wanted to improve performance then a User Space and pointer
approach would be the fastest option I suspect because after the pointer
resolution is is just regular memory access.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Apr 21, 2017, at 5:42 PM, Vinay Gavankar <vinaygav@xxxxxxxxx> wrote:

Hi,

We have a program where same record of a 'control' file (input mode) is
being read for every iteration, and I thought that replacing the 'Chain'
with reading a dataarea.

So I ran a simple test to compare the time taken to read one record in
file
100,000 times and reading a data area 100,000 times with 'IN' statement.

I was surprised that the file was read under 1 sec, whereas dataarea took
around 4-5 seconds.

Just to make sure, I looped for a million times. The file came in at 4
seconds and dataarea at 47 seconds.

I was wondering whether I am missing something or accessing a dataarea
with
an 'IN' statement takes that long compared to file read.
--
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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD





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.