Help with very large application.

I write thermodynamic Engineering applications for large electric power plants.  One such program is very large and I'm having trouble compiling the application.  I'm using Visual Basic 5.  In this application there are a large number of double presision variable names and a considerable number of subroutines to support the code.  I'm looking for some general programming ideas for very large applications?  I've considered breaking the application into several small sections that call each other.  The problem is this, the solution which the program arrives at is done iteratively.  You start with an initial reasonable guess and then the entire code executes repeatedly.  With each iteration, it uses the results from the previous iteration.  I want a smooth seamless look on the screen with a text or picture box where I can display intermediate data as the iterative process progresses.  Breaking the application into several modules which call each other, makes this difficult and does not look very smooth on the screen.  Any tips would be greatly appreciated.  Perhaps a suggestion for some further reading might be helpful (a suggested book).  Thanks in advance for your time and consideration.
prionusAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
p_sieConnect With a Mentor Commented:
2000 lines of code is not much. I have modules in a project that each have about 7000 lines so...

what I do think is a a lot is that you have about 2000 variables, almost as much variables as lines, that would mean that at almost every
line you are filling a variable with a value....

The use of arrays is very wise, if a lot of variables contain the same kind of information, then you could name them all the same...
Breaking up the application in different peices is not what I would recommend, your program will only get slower and more
errors can occur if you have to call one program from another.

What size is the compiled program?

0
 
p_sieCommented:
what do you mean by very large?
how many lines of code, how many procedures, etc..
0
 
mlmccCommented:
Do you have any pure code modules (no form).  If so these could be compiled to a dll or ActiveX control and included in the application.  This might reduce the compilation effort for the project.

mlmcc
0
 
mgronlundCommented:
Another Solution Might Be To Use TCP/IP And Pass The Information To/From  Another Application To Display The Information, i.e. The Viewer is LightWeight Compiles to under 50k (Depending On The Form Complexity) And The Workload Can Be On Another Machine Even Or Have Multiple Clients Viewing The Data.

My 2 Cents.

Mike

0
 
prionusAuthor Commented:
The code is approximately 2000 lines, including the supporting subroutines.  The code uses a little over 2200 unique variable names, all of which are double real values.  I have considered assigning a number to each variable and then writing a "utility" application that would read the source code file, convert each variable into an array element... say V(1), V(2)... etc. and then re-write the source code into another form module for compilation.  This would reduce the space required for the storage of unique variable names down to a single array variable.  I've used this technique with some old FORTRAN applications which were also very large.  Yes, I did say FORTRAN, I started programming back in about 1975 when all I had was the main frame at the corporate office and FROTRAN was all that was available.  Pulling subroutines out into DLLs might help and that is an interesting idea.  I like to have the source code at my finger-tips since I'm the principal user and add/change/enhance as I please on the fly.  Thanks Mike for the TCP idea... but this sounds like something beyond my "typical" skill set.  I'm an Engineer and I'm simply doing very complicated math.  The dispay part of the application is used only for display of intermediate results so I can watch the calculation progress and... if it fails, I can have a good idea where to begin looking.  The real results are sent to a file which is used by another application for viewing. plotting. etc.  I would welcome some other ideas.  I'm not in a hurry for an answer so please... sleep on it and kick it around some.  Thanks for your help.  
0
All Courses

From novice to tech pro — start learning today.