Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Will program size impact on performance?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Will program size impact on performance?
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 25, 2012 2:01 pm    Post subject: Reply to: Will program size impact on performance?
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

Senior Member


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

PostPosted: Wed Jul 25, 2012 2:25 pm    Post subject:
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    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Wed Jul 25, 2012 4:42 pm    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Jul 25, 2012 6:01 pm    Post subject:
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 25, 2012 7:48 pm    Post subject: Reply to: Will program size impact on performance?
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    Post subject:
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: 7904
Location: Bellevue, IA

PostPosted: Thu Jul 26, 2012 4:58 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What are the way we can improve CPU p... Gunapala CN DB2 10 Mon Oct 24, 2016 2:16 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us