Solved

Streamlining a VB6 application

Posted on 2006-11-22
9
176 Views
Last Modified: 2010-04-30
I have written a simple little API program to trap HotKeys and launch applications.  When compiled the executable is 24K but when running in memory it's over 3Meg.  I can't quite see the reason for the pregnancy.  My question is this, "What is the best way to minimize the overhead of a simple VB program?".  I'm writing this to run in a terminal server environment and I don't really want to hack out 90MB (30 users) if I don't have to.

What do I need to know you guru's??
0
Comment
Question by:sifugreg
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 10

Accepted Solution

by:
Kinger247 earned 25 total points
ID: 17997620
Its not just your application exe thats loaded into memory, its all referenced files too.
Can't be helped, if you need them in your app... they need to be loaded.
0
 
LVL 1

Author Comment

by:sifugreg
ID: 17999838
Guess that was part of the question.  "are there any unnecessary reference files loading".  There are no controls on the form sans a single button.  I'ts just something that remains hidden in memeory and monitors API.  When you compile,  does anything go into the .exe that is not on the form specifically?  Wondering if deselecting anything in Project References would help but now that I go look there isn't much there.  
0
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 25 total points
ID: 18000302
"are there any unnecessary reference files loading".  No, all of the DLLs that load are needed, by the app, or its internal support structure.  That is the basic 'footprint' of a minimal VB 6 application, and there is absolutely NOTHING that you can do to make it any smaller.  That is the internal 'engine' that enaables a VB 6 application to execute, at runtime.

AW
0
 
LVL 29

Assisted Solution

by:nffvrxqgrcfqvvc
nffvrxqgrcfqvvc earned 25 total points
ID: 18000525
3 megs is normal I wouldnt worry to much about that, check the processor usage if its 0-10 than everything is fine if you want my opinion
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:sifugreg
ID: 18001075
Okay, I guess if all three of you agree, it must be the way it is.  Remember when software came on 360K floppies?
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 18001818
oh yes !  those where the days .. but then,   360k was allot in our eyes then,
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 18002982
I once was on an assignment (many, many moons ago) at the US Army Tank Automotive Command - in Detroit, MI.  That is where the Army conducts all of the Engineering and design testing on Tank designs.  At the time, they had a Prime Mini-computer (anyone here remember Prime, or Data General or even DEC???).  It was one of the LARGEST Prime systems in the world and they had 1 Gigabyte of hard disk storage !!!!!  Back then that was HUGE.  Oh, how times have changed, in a mere 25 years  LOL.

AW
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 18003150
Times have changed huge just in the last 10, I think.

I remember a server bring as big as a waredrobe. With a 2 inch electrical cable stuffed in the side.
0
 
LVL 1

Author Comment

by:sifugreg
ID: 18003169
Definately remember the DEC but how many of you remember the first 10mb drive called the Gorilla Banana I believe it was Or was that a printer for commodore..   Wow, the memory fades but I remember MFM and RLL 30mb drives with their "stiction" problem where you had to smack the crap out of them to get the data to cross.  Back when we had to use debug to low level format a disk.  I believe we all walked uphill in the snow both directions back then too. ;-)

Interesting tidbit, I wen out and found a little program called HoeKey that performs the same functionality my VB program does and it idles around 250K.  Obviously not written in VB!  I may shelf min and use that one.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now