-
Process / Memory Usage
My program uses a huge amount of memory (8,000-10,000 memory usage and 80-90 cpu). I don't know why, i have a number of timers and thigns are constantly running. I have loops and thigns as well.
What do you think would be causing problems, is there a vb function that isn't the best to use? Any tips on how to generally decrease memory usage would be good. I have removed dead code and added '= empty' to all my 'dim's when they are no longer used.
I have 5 forms, like 7 modules. My functions are all to make things easier (eg. if i'm finding a window, rather than adding 'Findwindow' for every time i need to look it up, i made a 'FindThatwindow' function so that it's neater, code is smaller because it's all hidden in modules.
Please help me
-
Your question leads to about a dozen follow-up questions.
How many timers do you have running simultaneously and for how long? Those are extra cycles that are accumlating, be it small, more memory.
Are any of your loops recursive? Recursive loops, though a powerful technique, can be processor killers if the nested collection you are looping over is very large. Or even memory hogs depending on what you are doing with all that nested data.
Are you closing and killing all respective objects when you are done with them? Or making sure not to create new objects if you aren't using them or too early.
If it's just a snippet and not long, you could post your code here for review. Anything more than 20 lines *may* discourage help.
Good luck.
Michael Sanchez
Managing Technical Editor
Forum Moderator
FreeVBCode.com
Similar Threads
-
Replies: 1
Last Post: 07-14-2005, 04:53 PM
-
Replies: 0
Last Post: 11-02-2001, 04:22 PM
-
By Javier Albertos in forum VB Classic
Replies: 0
Last Post: 03-12-2001, 08:56 AM
-
By Javier Albertos in forum VB Classic
Replies: 0
Last Post: 03-12-2001, 08:56 AM
-
By Javaid Ahmad in forum VB Classic
Replies: 0
Last Post: 07-31-2000, 01:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks