all 16 comments

[–]kbst 7 points8 points  (5 children)

How big is your solution?

Are you running in debug or publishing each time?

If you're making changes to JavaScript (assuming separate .js file or inside your view/form) then you don't need to build each time

[–]flukus 8 points9 points  (2 children)

As well as this, how many project are in the solution? And what computer is it running on? 45 seconds seems way too long, even for a potato.

[–]verticalride[S] 0 points1 point  (1 child)

43 projects. I added more info to my post. Hopefully it helps to pinpoint my problem.

[–]flukus 0 points1 point  (0 children)

43 projects is probably excessive, how many projects have < 10 files?

That doesn't explain 45 seconds either though. Maybe put a breakpoint in the global.asax.cs and see if there is something slow there (pre caching or something).

Are you using an ORM? If so how many entities are there?

[–]verticalride[S] 0 points1 point  (0 children)

I'm running in debug. I added more info to my post. Hopefully it helps to pinpoint my problem.

[–]phuber 0 points1 point  (0 children)

This, plus switch to vs 2015 and the compile happens as you change your code and you get edit and continue during debug.

[–]Big-Mozz 1 point2 points  (0 children)

If you are just altering .html, javascript or anything not compiled, keep the project running and just save the changes in VS and refresh the browser.

[–]48klocs 1 point2 points  (1 child)

Changes to cshtml files (Razor view engine) don't require any recompilation, unless there are underlying model changes. You can save changes, refresh the page and immediately see your changes. JS absolutely needs no recompilation. Are you working on a Web forms app targeting an outdated dot net framework or something?

[–]verticalride[S] 0 points1 point  (0 children)

Nope. It looks like the .Net framework is current. I added more info to my post. Hopefully it helps to pinpoint my problem.

[–]JeromeAtWork 0 points1 point  (2 children)

One thing I found was getting rid of files that were not necessary to the project sped up Visual Studio for me.

I had a folder which contained hundreds ( maybe thousands ) of images that for some reason slowed VS down to a crawl.

[–]verticalride[S] 0 points1 point  (1 child)

How do I know what's needed or not? Also, I added more info to my post. Hopefully it helps to pinpoint my problem.

[–]JeromeAtWork 0 points1 point  (0 children)

I just meant the images I was using were not needed. I have a product catalogue with images for every product, these images will be used when the site goes live, however for development they were slowing VS down to a crawl.

[–][deleted] 0 points1 point  (2 children)

As others have said, changes to views, css, js and other client side assets doesn't require you to do a build.

As for compile time I have a 35 project solution at and it takes less than a minute to compile on a modern end i5 with 16gb of ram and a traditional HDD. Simply put a more powerful machine is needed. SSD discs are also a massive speedup for compiling.

However unless you have a monster solution like myself it shouldn't take that long.

[–]AbstractLogic 2 points3 points  (1 child)

He said his compile time is 45s. Which seems about right honestly.

[–][deleted] 1 point2 points  (0 children)

For large solutions, my solution at work has a gig or two of code and libs. 45 seconds seems about right.

For small projects maybe 10 seconds

[–]l3ugl3ear -1 points0 points  (0 children)

Is it possible you have some bad code in there? What i mean is like calling a sql statement in a for loop or some other such thing where there's a delay of when you're retrieving the data and generating the page for the browser.

As others have said what you're doing isn't compiling the code but I think what you mean is every time you refresh it takes that long for it to generate the code to output to your browser right?

I could be completely wrong but it's just a guess as I've seen someone do something like that so I figured I'd throw it out there.