Solved

Help with very large application.

Posted on 2004-05-02
5
165 Views
Last Modified: 2011-09-20
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.
0
Comment
Question by:prionus
5 Comments
 
LVL 9

Expert Comment

by:p_sie
ID: 10973460
what do you mean by very large?
how many lines of code, how many procedures, etc..
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 10974174
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
 
LVL 3

Expert Comment

by:mgronlund
ID: 10985379
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
 

Author Comment

by:prionus
ID: 11010614
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
 
LVL 9

Accepted Solution

by:
p_sie earned 250 total points
ID: 11012454
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

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel Vlookup to move data back to source. 4 91
Passing a Text Box name to a Sub 6 96
How to read File Date Created using VB6 8 39
Excel Automation VBA 19 70
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question