[.net] C# Program Slowing Down

Started by
4 comments, last by Geronimo2000 18 years, 9 months ago
I have a C# program which loads some data and processes it. You can load the data in as many times as you like. The first time I load it in, it takes 30 seconds. The second time is 70 seconds. The third time is 105 seconds, the fourth time is 140 seconds as so on. I've looked at the memory usage and it's always stabilized at the memory capacity used when the data was first loaded in, so there is no apparent memory leak. I have turned manual garbage collection on and off, with no difference in the results. I've already looked many times for areas which could have been storing old data, but I have found none, and I have absolutely no idea what could be causing the program to get slower and slower each time. Has anyone else had a similar problem using C#, or would anyone venture a guess as to what this could be (.NET runtime? something else unrelated to .NET?)? Any ideas or suggestions would be most welcome.
Advertisement
I am just taking a completely wild uneducated guess, but are you closing the file each time you are done with it?
Turring Machines are better than C++ any day ^_~
what sort of data is it, and how are you storing it? if you are just adding it a hashtable, but not clearing the tabel every time you reload, then there could be performance problems creeping into the app.

Are you catching any exceptions?
I'd need to have a look at the source code to get some ideas.
Blake's 7 RPG - a new project
each time it goes up by apparently one unit of processing time? (eg takes 30 seconds to do one chunk, 1x2, 1x3, 1x4, etc)

That kind of smells to me of something perhaps going through the process more then once... perhaps going over the same data more then once? A counter not being reset maybe?

As the other guy says it's kind'a hard to speculate without source, but I've got C# applications dealing with gigabytes of data and I can tell you that the only problems I've ever had with performance have so far been because I wasn't using the language quite right / some kind of logic flaw.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Thanks for the feedback - I, too, think it has to be the reprocessing of data, but I just can't find any problem like that and the memory usage somewhat indicates to me that it's not that, but I'll have to keep looking...

I guess it's probably not a .NET problem though if no one here has ever had a problem similar to this.

This topic is closed to new replies.

Advertisement