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



Coming from IBM the more static storage that a ILE program has the slower it
is going to run because it has to manage the static storage. The more stuff
that is automatic, the better it is going to run. ILE programs are very
efficient at allocating and deallocating automatic storage.

Reducing static storage is always a good thing.

On Mon, Nov 16, 2009 at 9:40 AM, DeLong, Eric <EDeLong@xxxxxxxxxxxxxxx>wrote:

Hi Darren,

I'll take a shot at this... I believe this falls back to how SLS
(single level storage) manages objects. There will only be one copy of
the program object in main storage at one time. Potentially many JOBS
can invoke that program object. All memory allocations for that program
occur at run time, so that storage for this program is local to each JOB
that is running the program.

The actual size of the program object doesn't impact the system as much
as the amount of storage to be initialized. Moving static globals to
local may not improve performance, since local variables must be
allocated and initialized each time the procedure is invoked. In the
global/static realm, the allocation only occurs once...

-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of darren@xxxxxxxxx
Sent: Monday, November 16, 2009 8:53 AM
To: midrange-RPG RPG message board
Subject: Affect of program size on memory usage


I've taken some pride in reducing static storage by moving variables to
local subprocedures, which also makes the code more readable too.
However,
I often see the size of the program itself grow by much more than the
storage reduction. I use DBGVIEW(*LIST), so I'm fairly certain that as
I
add more source lines, my program object grows quickly in size. SQL
also
takes a toll as it adds access path information when the program is
first
executed.

My question is, does the system i load the whole program object into
memory, or is their some intelligence there? If so, is there a way to
compare the real program object size, minus the source view?

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



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

This thread ...

Follow-Ups:
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.