Results 1 to 5 of 5

Thread: Optimizing an App

  1. #1
    Guest

    Exclamation

    Hi fellow VB-Coders

    I am developing quite an amazing text-editor (if I shall tell my own opinion). There's just some little problems with it. I have a suspecion, that my app uses way too many of the system resources, which makes it unstable and gives me a lot of errors like "Out of Stack space" and so on, which again causes my implemented Error Handler to go crazy and the whole thing terminates with the sweet little "Illegal Action" error thing as a result of it.

    I'm using a 700MHz computer (Athlon processor) with 128 megs of PC133 RAM, so something is way wrong, if my app uses up all that memory just by using it for half an hour or something.

    I would be very grateful if someone can give me some ideas of what could be wrong, and maybe give me some general things to do, to get the best performance of an app.

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    A couple of pointers.

    Are all variables impliclty declared. (no variants)

    Are you cleaning out objects when you are done with them?

    Out of stack space suggests a problem with a recursive fucnction of some sort.

    As for speed etc, only you can do that. Without seeing the code we can't tell you how to optomise it.


    Regards.
    Iain, thats with an i by the way!

  3. #3
    Guest
    I would like you to explain the "cleaning out" part more precisely... You mean fx. "Set someObj = Nothing" or what? I'm only using very few of those "Set someObj = Something"

    You'll also have to explain the "recursive function" part. I don't get your point...

  4. #4
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Yep i am talking about "Set myObject = Nothing" when you have finished with them. You should also clear out large strings when you are done with them "myString = "", as strings are notorious for eating memory.


    The stack is mainly used for placing pointers to variables, return points etc when calling procedures or functions. A recursive function is a function that calls itself. This means that it can quite easily use up all of the stack space.


    Iain, thats with an i by the way!

  5. #5
    Guest

    Smile Thanks

    Well...Thanks for the help lain

    I thought I got hold of most of these things, but maybe there are more long string-values I need to reset. I'll go check it again some time.

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