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



Hi Rory,

<snip>
For instance, I have a module in a service program which includes a
single internal procedure which loads data from a file into a statically
defined array and then 10 wrapper procedures to load the array from the
file, retrieve entries from the array, based on different key
combinations and also clear the array and reset all its related static
variables (it's a useful technique if you have an application which
needs to get control file data quickly and you don't want to deal with
lots of file I/O).
</snip>

I like that a lot! It's clean, the mode parameter has a use beyond a "reset" function. It encapsulates the file data quite nicely. I suppose you could have a reload() function to reflect any database changes, if required.

Funnily, I've been performing similar work on our control files - In one NEP I reduced the I/O on two files from 258853 to 78 each! The same 78 records in each file were being hit via a wrapper program. As this program is EVERYWHERE in our system, I couldn't implement something as nice as the work you've done. I simply cached the retrieved rows in a dynamic array as I retrieved them. On subsequent calls I performed a lookup before chaining. Knocked 25% off the runtime on bench tests.

It looks like some form of o-RPG will be around here soon. Whether by design, or simply out of the code that's evolving out there.

Cheers

Larry Ducie



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.