Executable too large ?
The question concerns a VB 6 application. The application aims to contain the activities of most departments of the company, so the executable at this point has a size of 6.5 MB. An effort has been made that the code is not heavy on resources, but can the size of the executable alone cause any problems? A standard user configuration is P4 1.6 GHz with 128 - 256 MB RAM. What if the executable finally gets twice this size?
[424 byte] By [
mira] at [2007-11-19 13:59:38]

# 1 Re: Executable too large ?
If the exe is bigger than the amount of RAM then Windows will use virtual memory. You're a long ways from reaching that point anyways. :)
# 2 Re: Executable too large ?
If the exe is bigger than the amount of RAM then Windows will use virtual memory. You're a long ways from reaching that point anyways. :)
Just a little clarification. Virtual memory isn't just used when the RAM is full. It takes some of the RAM in use, copies it to the hard drive, and from there uses the RAM for the NEW application. The virtual memory is actually a copy of RAM.
# 3 Re: Executable too large ?
The question concerns a VB 6 application. The application aims to contain the activities of most departments of the company, so the executable at this point has a size of 6.5 MB. An effort has been made that the code is not heavy on resources, but can the size of the executable alone cause any problems? A standard user configuration is P4 1.6 GHz with 128 - 256 MB RAM. What if the executable finally gets twice this size?
:eek: 6.5MB is quite big. Do you have embedded pictures (in Picture Boxes, on Forms, etc) in your exe, consider removing them from the exe and add them during runtime. The reason is that when you start your app, whole of the EXE gets loaded in to the memory and a 6.5 MB executable will take a lot of time to get loaded and then when you start using it, it will take time to jump from one statement to another.
# 4 Re: Executable too large ?
6.5MB is quite big.
I don't know about that. I think something like Office (128Mb) is what I start to think of as large.
Trust me at 6.5 M there won't be much of an impact on a P-IV.
If you are really worried about it, then split your program up into smaller bits and pieces. e.g. take out pics etc and (as said) load them at run time. You can also make dlls and place your code in them. Or, you can also make COM objects.
But seriously don't stress about 6.5M.
Also, the statement "the whole program is loaded into memory" is not true. There are some very crafty and complex methods used to manage the resources consumed by applications, e.g. "path expectation" and so on. Generally yopu don't need to get your self to hung up on these details. But... what you should ALWAYS do is worry about carefully using the additional resources that you need. i.e. don't use HUGE blocks of memory unless it is justified etc.
# 5 Re: Executable too large ?
I don't know about that. I think something like Office (128Mb) is what I start to think of as large.
Well size does have an impact on performance. And moreover in MS-Office, the biggest EXE that I have seen is MS-Word (10 MB Approx).
My reasoning for having this big size is that the developer has used too many images or pictures in the exe which are embedded, this will take time when you start the EXE. Try using Resource Files and load pictures during runtime.