Performance slows down gradually

  • Thread starter Thread starter cow3
  • Start date Start date
C

cow3

Is there anyone who can help me with this:

I have written a fairly complicated vb application of hydrological
model that does a lot of number crunching. The model creates a set of
object variables before entering the main loop and then main
calculations are done within the main loop using the object variables
previously created. The application starts off with pretty good
performance. But, after a while, it starts to slow down gradually to
an unbearable point. In a suspision that file accesses might be
causing the problem, I turn off the file writing, but no improvements.
Has anyone experienced similar problem? Any insight would be very much
appreciated.

Thanks,

Chris
 
Shot in the dark but . . .

This may be a memory issue ( either disk or physical memory ) . If your
program is creating huge quantities of new objects and waiting for the
garbage collector to come along and remove them, it may be that you are
using up your physical memory and swaping out to disk.

Try closing down all other open applications if applicable and see of this
makes any difference, ( check your physical memory when you get the go
slow ), if neccesary, put more memory in or start changing your code to
delete objects once ur done with them.


Regards - OHM
 
OHM,

Thanks very much for your advice...
It seems I didn't explain very well about my problem :(
When my model slows down, even when it becomes VERY slow, the memory
usage of the process doesn't fluctuate too much - almost same from the
beginng till I kill it (I cannot stand it!). As there is about 200MB
of free memory, I don't think it is a memory deficit problem. As I
said, it doesn't access the disk either. So I feel I'm left in a
complete darkness not knowing where to dig!

Thanks,
Chris
 
This is a little bit difficult without more information.

Basic Questions. . .

1.) Is the application accessing a remote service ( Such as an SQL server ),
if so is it waiting for a response ?

2.) Are you using remote disk letter assignments or URL's
\\servername\share\directory etc ?

3.) Is this only on your machine or does the application fail on another
machine also ?


Other than that, if the application is not to large, you could post either
that ( zipped ) or your code segment which is causing the problem and maybe
we could take a closer look.


Regards - OHM
 
At this stage, my model is designed to run on a PC and no
communications with other PCs or access to network disks/DBs is
implemented. My instinct is that it might be something to do with the
garbage collection, but do not know how to check :(
The code is pretty large - over 4000 lines - so it is not appropriate
to be posted in here and I am not sure if I am allowed to do so.
Thanks,
Chris
 
Yes, 4000 lines is rather large, is it not ?

I suggest then that you read up on garbage collection and examine your code.
Try and think of a way of sectioning your code so as to test various
classes/modules to see if you can establish the culprit.

I know this is not any direct help, but at the end of the day it is a
process of elimination which will get you the answer to this conundrum.

Let us know how you proceed and if we can be of any specific help along the
way.


Regards - OHM
 
January,
Wow, this is a great tool and I cannot believe it is free!
Thousand times thanks ;)
Chris
 
Well, not yet. But I am sure this tool will be of a great help to
pinpoint my problem.
Thanks,
Chris
 
Back
Top