Process / Memory Usage


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Process / Memory Usage

  1. #1
    Join Date
    Nov 2004
    Posts
    18

    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

  2. #2
    Join Date
    Dec 2003
    Location
    San Diego
    Posts
    202
    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

  1. Memory usage statistics for a process
    By gregochr in forum C++
    Replies: 1
    Last Post: 07-14-2005, 04:53 PM
  2. help memory
    By kathy in forum Java
    Replies: 0
    Last Post: 11-02-2001, 04:22 PM
  3. Memory usage of process
    By Javier Albertos in forum VB Classic
    Replies: 0
    Last Post: 03-12-2001, 08:56 AM
  4. Memory usage of process
    By Javier Albertos in forum VB Classic
    Replies: 0
    Last Post: 03-12-2001, 08:56 AM
  5. Memory Usage by a Process
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center