Avatar of ottenm
ottenm

asked on 

need tips on shortening the recompile/refresh-browser cycle

In VS 2005 I'm spending more and more time between code changes in the IDE, and seeing the effects in a refreshed browser page.  Compiling seems like maybe 30% of the time, and the browser-refresh more like 60%.  CSS and javascript are trivial, and many property changes in the aspx are, well, better than a full recompile, but changes to the code-behind seem brutal.  I use ctrl-shift-b to compile/rebuild, maybe this is the only culprit?

Related: I read once there was also some way to edit while debugging, and then just compile/deploy the one module you had edited.  During debugging, all my code pages are read-only.

Thanks for any help.  Other than links to Dell, IBM, other hardware vendors, or blues artists.  ;)
.NET Programming

Avatar of undefined
Last Comment
SStory
Avatar of ChetOS82
ChetOS82
Flag of United States of America image

Might try configuring it to build just the page rather than the site.  Go to the property page (right click on your Project, it is at the bottom).  Click the Build option.  Then change "Before running startup page:" to "Build Web Page".

Also, don't use Ctrl+Shift+B, just click the "Start Debugging" icon (looks like a play icon).

One more thing that might affect it.  If you have a lot of files in the subdirectories it can dramatically increase build time.  Even if those files are not in any way related to the website.  Might want to check for temporary files or something.  Just a suggestion, probably isn't the case.
Avatar of SStory
SStory
Flag of United States of America image

Explain browser refresh issue.  Are you talking about data?  If so Page caching of the data can help a lot
Avatar of SStory
SStory
Flag of United States of America image

Does this help?
http://msdn.microsoft.com/en-us/library/399f057w.aspx

I haven't used 2005 ASP.NET, in 2003 it was a single dll. If that is still the case you will still have to JIT it all on first use, but the above could help you precompile it.

One way to do things faster is to run a local webserver and not have to publish things until you are done.
Avatar of ottenm
ottenm

ASKER

Thank you both for your suggestions.

ChetO S82, I don't see a Build option under properties.  Tabs for Application, Compile, References, Resources, Settings, Signing, and Web, but even under Compile, nothing resembling "Before running startup page."

When I launch the debugger, all my pages change to read-only, and the browser takes even longer to load/reload the page I'm working on.

I do have some extra files in there (maybe 20-30), I will create a virtual directory and move them out to see if that helps.

SStory: not the data refresh.  I see what's happening in the browser, switch back to VS to make some edits, rebuild, go back to the browser and hit refresh to see the changes.  And then I look out the window to exercise my eyes, fidget with a pen or some paper, look back out the window, breath, ... and similar.
Avatar of ottenm
ottenm

ASKER

I will read up on precompiling to see if that helps, too.  Thank you very much.

And for development, yes, I am using a local IIS.
Avatar of SStory
SStory
Flag of United States of America image

I'm afraid that is part of JIT compiling.  It is slow.... the first time.  When you do a build it should be doing a smart build and only relinking what is needed though.  If you only make visual changes to the ASPX file you don't need to recompile. If you make code changes, you do.
ASKER CERTIFIED SOLUTION
Avatar of MonkeyPushButton
MonkeyPushButton
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of SStory
SStory
Flag of United States of America image

Great link MonkeyPushButton!  
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo