IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Will program size impact on performance?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Jul 25, 2012 1:14 pm
Reply with quote

I have a program which contains over 1000 lines, and the sources still keep growing in accordance with increasing requirement.
I'm considering of developing a subprogram, because I'm afraid that with the increase of sourcecode size, program performance will be brought down.

Can anybody please advise if there is a connection between program size and program performance?

thanks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 25, 2012 2:01 pm
Reply with quote

The biggest impact is going to be volume of data.

If you design your program so that you get something easier to understand and maintain, you won't be able to notice any performance drop just from lines of code.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 25, 2012 2:25 pm
Reply with quote

I'm not sure why the number-of-lines-of-codes is being connected with the performance of the program?

Having less number of line of code might make it maintable but then "performance" is totally differnt animal.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Wed Jul 25, 2012 4:37 pm
Reply with quote

thanks for your reply.

so, it's not necessary to worry about that.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 25, 2012 4:42 pm
Reply with quote

Program (load module) size can impact performance, particularly under CICS, but it is rarely the number of lines of code that is a concern, but rather the data structures defined in the program's WORKING-STORAGE. 1000 lines of COBOL code is actually a pretty small program; I've worked on many COBOL programs in the last 35 years, and the average number of lines of code is probably between 3000 and 4000. I have worked on programs with over 20,000 lines of code.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Jul 25, 2012 6:01 pm
Reply with quote

I don't start to worry about program size until it is over 5000 lines. And even then my concern is only about maintainability, not performance.

Not that smaller programs are necessarily more maintainable. I have worked on a system contained about 10 000 programs, each one about 150 lines. It was a nightmare to navigate through the code to figure out what was going on.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Jul 25, 2012 7:09 pm
Reply with quote

Not for nothing, but I'm curious as to WHY you thought this might be an issue.

Maybe, just maybe, there is something weird at your shop that has created this "old wives tale" and kept it alive.

Ask around and see if anyone knows why they are even thinking about that issue. Chances are it's nothing, but it may pay to check it out now.

Two things I can imagine is that you have an ancient sysprog that still thinks in "pages." Or that you have a newborn sysprog that thinks in Java and has never worked with compiled code.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 25, 2012 7:48 pm
Reply with quote

MVS paging can greatly impact performance. If the program is COBOL and it's been compiled using the OPT(FULL) compiler option, then the compiler places PERFORM's of internal routines in-line to reduce paging. This can result in a load module which is greater in size than a load module without OPT activated during compilation, due to the redundancy, but better performance with reduced paging. OPT(FULL) generates more all-around optimized object code.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Jul 26, 2012 4:29 am
Reply with quote

Bill,
Is this still true under z/OS (assuming that's different than "MVS")?

How do you check the amount of paging going on during a program run?

Are there system-level optimizations going on that attempt to load the entire program into core even without the OPT(FULL)?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 26, 2012 4:58 am
Reply with quote

Paging is less of a concern than in the past in these days of z/OS machines having gigabytes of memory available. However, when paging does occur it can have a big impact on the LPAR, so if there's any indications of paging that needs to be addressed. As far as I know, the way to check paging is to use a monitor such as Omegamon or Mainview or MXI. After the fact, analysis of SMF data can show paging as well.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 26, 2012 5:24 am
Reply with quote

you know when your system is not tuned and a lot of paging is going on;
you have time to go get coffee after you have hit ENTER. icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts exploiting Z16 performance PL/I & Assembler 2
Search our Forums:

Back to Top