|
-
Dec 2nd, 1999, 09:53 PM
#1
Thread Starter
Hyperactive Member
I've been asked to review and modify some code from an onld employee. He never commented anything which is always nice. The prog I'm supposed to remake will be called by another one. It needs to run different routines depending on what is sent in as Command Line args. This is fine, I can do that no prob. The question I have is this. He designed it with about a million Global variables. Ok, maybe not that many but alot. Now alot of these globals are only used by 1 function and that's it. plus he's jumbled alot of functions together into a handful of modules. He also repeats a few functions. NOw, I can't remember whether the modules code and globals are only loaded when you call it or if they all get loaded at once.
Also, would it be better mememory-wise, to set some of the globals to locals or similar? There is really only 1 or 2 forms that the user will see from my prog and one is just a Splash screen.
I know forms are only loaded when you want them to, but I can't remember with modules. Basically, what I'd like to do is have only the code that is needed loaded into memory and nothing else. I have, more or less, complete control over how I code this, whether to have several different splash screens for each different type of function. And load the currently global variables as locals or something from these forms. I appreciate any help I can get. I'm still pretty new to tryin to optimise my code and working in the corporate structure. Most of my coding has been for me or small apps where this stuff didin't matter. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|