Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modularization Techniques

sanjana_lingras
Active Participant
0 Likes
733


Hi Experts,

Is there any limit on how many subroutines should be used in program?

Like if particular no. of FORM..ENFORM is increased then it will affect the performance of the program.

Regards,

Sanjana

5 REPLIES 5
Read only

Former Member
0 Likes
702

If a program takes half second extra to execute, but it saves 15 minutes during analysis because it is easier to read, it is a good deal overall.

So keep modularizing unless there is definitive proof that performance is getting affected.

Read only

0 Likes
702

Hi,

I am using this opportunity to ask about minimizing global variables usage and using typed

parameters and local variables instead ?

Regards.

Read only

0 Likes
702

Agreed.

Read only

Former Member
0 Likes
702

hi sanjana,

subroutines main aim is reusability...if the code is more than a time in your report.. you can put it in a subroutine to reduce the report size...the subroutine never effects the program if u call any number of times....its the code which you write inside the subroutine is simple and fast it will not affect the program... if the code inside the subroutine is making access of big tables to fetch data then surely the  perfomance will degrade if u call this subroutine a number of times...

thanks

gunaseelan

Read only

Former Member
0 Likes
702

How about creating a method of a class and use (instance or static based on the requirement)?