Results 1 to 5 of 5

Thread: Need an expert on memory optimization

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Kansas, USA
    Posts
    58

    Talking

    I'm working on a program that keeps track of your projects and how much time you spend on them. The problem I'm having is that it uses lots and lots of memory. I need someone with lots of VB experience to tell me what is using so much memory and help slim down the code. Please email me if you think you might be able to help.

  2. #2
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231
    Well if at all possible, you can email it to me, or least tell me how you are using it. would like to know the size of the project(source code wise). when you say huge, do you mean huge in memory(Ram) or huge on disk after it has been compiled, if its on rams, I would think you possibly have a loop in there creating new data types all the time, and never killing the old ones, or all your data types are variants (variant strings can take up a huge ammount of memory compared to other data types)
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Kansas, USA
    Posts
    58
    I'll get back to you in a few days...I just released a beta to the internal QA team. I'm talking memory usage here. The main program uses about 9MB of RAM under Windows 2000, according to Task Manager. Compiled the program is less than 1MB, and I use a ExePacker so it's only 220K when compressed. Source-code wise, it's approaching 10000 lines. I have tried to declare most variables, but there may be some that are variants, although I'm not sure that it would make that big of a difference. There can't be that many Variants other than temporary variables. I'm not sure about the loops part, although I have tried to keep control over those. I'll email you the address where you can download the compiled version, for the time-being.

    Thanks, Mike

  4. #4
    Addicted Member
    Join Date
    Apr 2000
    Posts
    215
    I'm no expert on memory usage but heres a little bit of info on how much space a data type takes up in memory.
    an Integer takes up 2 bytes of memory.
    Long 4 bytes of memory,
    Single Positive uses 4 bytes of memory
    Single Netagtive uses 4 bytes
    Double positive 8 bytes
    Double Negative 8 bytes
    Currency 8 bytes
    String it depends on how many characters are in the string
    also a variants like kb244 said take up more bytes,
    so it all depends on how many string, or what ever, you have in your project, and like kb244 also said you may have a loop continuely creating new data types which would guzzle a lot of a computers memory.

  5. #5
    Member
    Join Date
    Jun 2000
    Location
    Earth, Milky Way Galaxy (Take a left turn near our Sun and ask for directions at your nearest space port, just ask for Dax.)
    Posts
    35

    Cool Maybe I can help

    I've optimized many software.

    ITs a bit difficult to say anything. If I can see the source code, I can maybe help. Sometimes, small things can do great things.

    I'm also gonna write an article right here at http://www.vb-world.net maybe about mem optimization soon.

    Mail me at [email protected] and maybe we can talk bout it.
    Dax Pandhi
    CEO, Nukeation Labs
    www.nukeation.com
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width