My app running in Visual Studio has started going REALLY slow!

Felecha

Freshman
Joined
Jun 14, 2004
Messages
34
I'm something of a rookie, just one year using VB.Net. I have several applications that I'm developing, one of which has started going REALLY slowly when I run it from the IDE. It's a

Windows Forms app, by far the largest thing I work on, something over 20,000 lines now, of which 7400 lines are the Windows Generated stuff. Lots of tab controls with lots of buttons

and boxes and grids.

As it has grown it has been taking longer to start up when I want to run it in IDE debug mode, but beginning yesterday there was a VERY big jump in the time. I haven't been timing it before, but I now see it taking at least a minute and often more (1:30 is the worst I've seen today), from the time I click to Start until it finishes building and appears as a finished Form. It has not been taking anything like that amount of time, ever. 15 to 20 seconds maybe? It starts directly from the executable in about 4 seconds. This is a BIG pain, as I do lots of starting and stopping, to see the results of my work.

I got out an archived version from last week, and that one starts up OK. I began putting in breakpoints in both of them to try to track the progress and now I find that the older one takes about 3 seconds to reach the Public Sub New() in "Windows Form Designer generated code". The current slow one takes almost 40 seconds to reach the same point.

I thought that New() was just about the first thing the program did. Is there something behind the scenes that could be getting in trouble? Since last week I have not added any controls, I've just been working on code that interacts with the database it connects to.

Any ideas?
 
Well, maybe it was something else. I saw a remark in another post about Setup, and got to wondering if something was wrong with the Setup Project in my solution. I have Crystal Reports built into my app, and I never did understand all of what I have been doing with it. When I first started with it I followed instructions to do the Setup stuff with the Merge Modules and all, and the Setup Project I added has stayed there all this time. I have since learned a little more and now, based on fooling around with it some today, I discovered that I can remove it from the solution entirely with no problem and in fact it all loads and starts very fast now. I conclude that once I actually run the Setup.exe generated from building it, Crystal has done all it needs to do to make my whole machine Crystal-runnable. I thought you had to add the damned thing to every app you build. So maybe today's problem was that something went wrong there, and the payoff is that I find I can remove it from ALL my apps now. I sure hope that's right!
 
Remember that from the IDE you are generally in Debug mode, This puts over head on the code....

Try changeing the build action at the to of Visual Studio to release and tell me what happens.
 
Back
Top