Solved

Reducing ram usage

Posted on 2000-04-28
4
292 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
ID: 2758856
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
ID: 2758947
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
ID: 2759233
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
ID: 2759253
Thanks!
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

Suggested Solutions

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 52
DIR issue 7 51
bit defender blocks good applications 2 82
SLMGR Switches Are Not Working On KMS Host 3 69
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now