Solved

Reducing ram usage

Posted on 2000-04-28
4
290 Views
Last Modified: 2010-05-02
I have a VB app that because of the amount of work it has to do takes a very large percentage of the server's ram which practically brings the server to a halt.  Is there any tricks to reduce ram usage in VB.  Any help would be great!  Thanks!
0
Comment
Question by:vgru
4 Comments
 
LVL 18

Expert Comment

by:deighton
Comment Utility
depends on the code you've got so far/what the program does.

 Avoiding variants where a type like integer can be used is a good one.  

Avoid large arrays of public variables etc.
0
 
LVL 1

Expert Comment

by:4P
Comment Utility
I agree with Deighton on avoiding public variables and arrays.

I just wanted to note that it's a good practice to free up everything you don't need anymore. I mean objects, escpecially large automation objects and also recordsets.

It would be helpful to know what kind of tasks your program does.
0
 
LVL 1

Accepted Solution

by:
jgravelle earned 20 total points
Comment Utility
I would also agree with the previous suggestion as well you may want to use light weight controls where possible. Use an Image box instead of a Picture Box, Labels instead of textboxes if you just need to display values on the screen, avoid using a bunch of different fonts on your forms. And like the last comment said always always release any objects you have set by setting them to nothing.
0
 

Author Comment

by:vgru
Comment Utility
Thanks!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 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

17 Experts available now in Live!

Get 1:1 Help Now