When you have a pretty large web site in Visual Studio 2005, the
site build time grows dramatically and it becomes very difficult to
change code and then hit F5 (or Ctrl+Shift+B) in order to see if
the project builds properly or not. In Pageflakes, we have a giant web
site. It takes so long to build the site that we generally issue
the build command, go to kitchen and make a cup of tea, drink it,
come back and see the site still building. Generally when we do
this 20 to 30 times per day, we start feeling sick (not
because of VS 2005 instead of too much tea).
Here’s a cool idea we tried. You can make
folders hidden by going to Windows Explorer, go to Folder
properties, check mark “Hidden” and click OK and then select “Apply
to current item only”. This will make the folder hidden and the
folder will disappear from Windows Explorer unless you have turned
on the option to show hidden files and folders. You will also see
the folders disappeared from Visual Studio. Now we use Total
Commander instead of Windows Explorer so hidden folders are not a
problem to us. Bascially none of us remember anymore how to use
Windows Explorer because we are so used to Total Commander now. Try it, it will
change your life.
When you make folders hidden, Visual Studio will not build them!
So you can make App_Data, App_Themes, images, stylesheets,
javascripts, html files hidden and Visual Studio will skip them.
Around 70% of our web site is non C# code. So, we gained dramatical
reduction in web site build time by trying this idea. Another idea
is to move all classes from App_Code to external DLL project. Thus
they will build once and VS will not build them again and again if
you make some changes in some codebehind file or some .aspx or
.ascx file. This will also give you significant build time
reduction.
Of course you can turn off Build Website and use Build Page
option. But that does not help. We want to ensure the web site code
is not broken due to any change. So, we need Build Website
option.
Omar,
Presumably the Pageflakes code base is quite large. Have you considered using the Web Application Visual Studio project, rather than a website ‘project’?
Regards,
Matt
Great! Thanks Alexander for the suggestion. We definitely need to try this ASAP on our project.
As far as I remember “Web Application Projects” does not validate web pages at all.
Just checked TagWorld. It looks like a serious competition to MySpace!
total commander is really a magical kit 🙂 once i start using it really change my working style 🙂 thanks for intro this with all of us 🙂
and u find very nice step to solve ur problems 🙂 bravo 🙂
regards,
samiha
Good idea! Must try it soon.
At tagworld we use web application projects, and all non page code is in separate DLL projects.
For web pages validation we are using asp_netcompiler as post-build event.
We also wrote special studio plug-in for resourses validation.
The build time is about 30 sec from studio and 15 sec from command line.
it’s about 350 000 LOC for html / js / cs / aspx / ascx files and all the static content
Pageflakes ?20-30 ?
Omar…
I just tried to pull out all my code files from the App_Code folder, and putting it in an external class library project.
My website response is much slower then if the code is inside the App_Code folder.
Have you or others experienced that?
Greetings
Let me explain what I mean. The problem arose when I developed a web based application. I needed to choose
Idea is simple but it reduced lot of my Build Time …I just make my “admin” and “Forum” files as hidden (which are not required to build every time) , Its working Fine …Thanks alot omar.
Great article ya zabir