×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Making a program smaller

Making a program smaller

Making a program smaller

(OP)
I have a VB6 program that does design, engineering, drafting, estimating and material control functions ( it has lots of buttons and screens for lots of people ).  When compiled it is around 890Mb.  Jeepers, that's large !!  How can I reduce the file size?  Are there 3rd party compilers that are more space efficient than MS?  I tried in the compile options to optimize for size but that only reduced it by about 62k.  Also, the memory load is 3,120K (from the Windows Task Manager) - how can I reduce this?

RE: Making a program smaller

890Mb ! It that the exe file? The mind boggles.
There is no other compiler that will improve this, it sounds like the problem is in the program design.
Are all the buttons individual or are you using Control Arrays?
Or is the 890Mb the program and it's data - does it use a database? Can that be compacted?

RE: Making a program smaller

(OP)
890Mb is the exe file.  Most buttons are individual.  There is no database, just a few arrays for temp storage of part numbers, etc.

RE: Making a program smaller

Are there a lot of pictures in the buttons, all individually loaded into the buttons at design time?
Are they plain bitmaps? Changing them to GIF's might help.
Or loading the pictures from a picture clip control.

RE: Making a program smaller

(OP)
I use no pictures on any buttons, a few are colored from the properties window.

RE: Making a program smaller

Perhaps you are statically allocating memory for whatever the program is doing?  Although that doesn't quite jibe with the memory demand.

TTFN

RE: Making a program smaller

I think you need to split your software progam to DLL's and/or ActiveX's. It hepls you with loading and your application to be a bit faster. But the space is nearly the same.

Do you clean your arrays to remove unnecessarily information?


Vlado

RE: Making a program smaller

(OP)
I can try to go the dll / activex route.  Maybe when I get some time.  I don't clear out the arrays because they are data read from disk used to cost our products.  I used to rely on disk files but that was pretty slow.  So now I read it in to arrays.  Perhaps I could specify the data types and use integer when possible and limit the string lengths.  Maybe I'm just dreaming.  The program does after all make autocad drawing dxf files, excel estimates, a complete bill-of-materials, a full set of fabrication drawings, opens and manipulates inventory projection spreadsheets and offers the user choices to customize our product in a myriad of ways.  It draws plan views on the screen for evaluation, performs weight and buoyancy calculations, interfaces with shipping, order, quote, inventory, job tracking and chemical compatibility documents spread out on our LAN.  It works for LAN connected PCs and laptops on the road.

I guess I'll just keep plugging away....thanks for your time and suggestions

RE: Making a program smaller

What gets me is that for my own software, ControlDraw, the memory load is 13,156K , but the exe file is only 2.8MB.
It has 78 forms and 47,537 lines of code, excluding comments.
Try installing MZTools (http://www.mztools.com, brilliant and free) and using it's analysis feature to check out the program.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close