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



Pete,

I think you're right on the %lookup and sorta things - the sorta's only
going to take a sec at the very beginning, and hans assures me that my
lookups will take no more than 10 or so iters, so i'll be looking other
places for more savings.

I've already cut a 6 hour update down to a couple (I think that's how long
it'll take, i'm using a smaller test file for benching).

my next savings will probably be what you've described.  I've not used
userspaces yet (i don't think - maybe that's what I'm doing when I allocate
space in an rpg program, don't know for sure) but would be willing to try.

I'd at least like to exit and return multiple records (say, at least a
hundred at a time?).  Maybe, I could add a 'number of recs to read' parm to
my read function and let it do that.  not sure how though - i'm using the
_C_IFS_fgets function, and it gets a record at a time.  If i just call it a
hundred times, i don't know what i'd be saving.

I know you can specify the number of bytes to get in the read() function.
that'd something to try.  do you have a good and simple example of a
program that uses userspace?

thanks for the thought-food.

Rick


I wonder whether there's any benefit to be derived from calling C-functions
instead of doing the RPG ops, e.g. qsort rather than SORTA and bsearch
rather than %lookup?

Probably not. Maybe Bob Cozzi would know but I wouldn't be surprised if,
under the covers, SORTA actually uses qsort and %lookup actually calls
bsearch!

One other question. How are you reading the records from the IFS? Are using
the UNIX-style APIs ("read") etc.? If so, are you calling "read" 2 million
times specifying a small buffer size (the record length)? You might find
it's quicker to read the whole file (or as much as will fit) into a maximum
size user space with a single "read" operation and then process the the
buffer.

Pete



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.