Speed up development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/25/2011 4:18:13 AM
Gravatar
Total Posts 19

Speed up development

Hello again. I develop some modules and when I get into bugs I have to reload the page with the new compiled dll(s) everytime i change something in my code as an attempt to overcome the problem. My PC is fairly old and burdened so loading takes time (around 1 minute or maybe more). 

Everytime i build the module i have to copy-paste the files into the  folder that is used by the server because for an unknown reason post build xcopy commands fail (although i insert the correct paths.did not want to lose time searching this further.) and then i have to wait around 1 minute for the server to load it up. I lose around 1 hour on average for every buggy line and 7-8 compiles. I am new to ASP.NET and C# as i have said.

Do you have any ideas of what could i do to improve this situation? Thanks in advance.

1/25/2011 4:43:07 AM
Gravatar
Total Posts 39
Hello from France!

Re: Speed up development

Hi Griever,

I had the same problem with the post-build.
So the first time I manually copied the files and directories in mojoPortal\web and mojoportal\web\ bin.
After this, the post-build work properly.
I also had a problem because in the xcopy post-build, I left some spaces before or after the \ separator.
I show you my post-build commands that works (my module call KSearchEngine) :

xcopy /s /y "$(ProjectDir)binKSearchEngine.UI.dll" "$(SolutionDir)Web\bin\"
xcopy /s /y "$(ProjectDir)bin\KSearchEngine.Business.dll" "$(SolutionDir)Web\bin\"
xcopy /s /y "$(ProjectDir)bin\KSearchEngine.Data.dll" "$(SolutionDir)Web\bin\"
xcopy /s /y "$(ProjectDir)KSearchEngine\*.ashx" "$(SolutionDir)Web\KSearchEngine\"
xcopy /s /y "$(ProjectDir)KSearchEngine\*.ascx" "$(SolutionDir)Web\KSearchEngine\"
xcopy /s /y "$(ProjectDir)KSearchEngine\*.aspx" "$(SolutionDir)Web\KSearchEngine\"
xcopy /s /y "$(ProjectDir)KSearchEngine\Controls\*.ascx" "$(SolutionDir)Web\KSearchEngine \Controls\"
xcopy /s /y "$(ProjectDir)App_GlobalResources\*.resx" "$(SolutionDir)Web\App_GlobalResources\"
xcopy /s /y "$(ProjectDir)Setup\*" "$(SolutionDir)Web\Setup"
 

Again, be carefull with the spaces. You can check the commands with ms-dos prompt.

Hope it will help

Christian

1/25/2011 5:55:10 AM
Gravatar
Total Posts 19

Re: Speed up development

Hi Christian and thanks for your response.

I recall that I had checked the xcopy commands at ms-dos prompt but they did not work for some reason. I will revisit that when i have time although i can live with it.

However, my main problem is the slow loads on IIS or VS Web Server. If I use the code-behind files directly will I see some difference? What changes should i do to run my module like that? Of course , when it is finished I will bring the dlls back.Thanks.

1/25/2011 1:44:14 PM
Gravatar
Total Posts 18439

Re: Speed up development

Those commands probably won't work from the dos prompt because they use VS specific tokens like $(ProjectDir) and $(SolutionDir) which will not be recognized from the dos prompt. It has to run in the context of Visual Studio. There is a VS specific command prompt but even that may not work if it does not have the context of the solution and projects.

You should fix that and not copy things manually, fixing that may speed it up a little but really VS is a resource hog, it is painful to use it with large solutions unless you have a beefy machine so I would not expect a lot of relief without getting a better machine. It is painful for me to ever use my old laptop for development anymore because of this but its fine on my more powerful desktop machine.

Best,

Joe

1/27/2011 3:18:55 PM
Gravatar
Total Posts 19

Re: Speed up development

Hello again. Well believe it or not , I got used to it. I run 1 project at IIS (postback issue with VS) and 1 project at VS for debugging so i copy paste to both when is needed. And yes i know these variables are not recognized at DOS but thanks for pointing that out. 

I guess my machine does its best. Pentium 4 2,53 Ghz , 2 GB DRR, ancient windows xp sp3 installation. Can't do anything about it. Anyway, thanks for your support.

5/9/2011 6:11:53 AM
Gravatar
Total Posts 60

Re: Speed up development

I've been driven to distraction with the compile/test cycle on my 1.6Ghz laptop - it was taking maybe 20 seconds to compile my custom projects in VS, which were then xcopied to my local web dev site (also on the laptop), but it then took IIS up to 5 mins to recompile the site and finally present me with a web page to test.

The other day I stumbled across this link and added   <compilation optimizeCompilations="true"> to the web.config on my dev site and IIS now does returns the page in around 15 seconds!!!  Note that there are a few caveats but I've been using it for the last few days and so far so good!

http://blogs.msdn.com/b/davidebb/archive/2009/04/15/a-new-flag-to-optimize-asp-net-compilation-behavior.aspx

Ian 

 

5/9/2011 1:33:16 PM
Gravatar
Total Posts 18439

Re: Speed up development

Interesting. I tried this today and had no problems for a while but then I suddenly had a strange thing occur where the menu stopped using the ControlAdapter and was rendering as tables. I tried rebuilding the whole solution but the problem would not go away until I removed this change from my Web.config.

I've put it in there in comments with a link to the blog post about that setting, so people can use it if they need to, but due to the problem I encountered I'm reluctant to make that the default.

One other thing that is helpful is not using the debugger unless you need to step through the code. You may not be doing this but a lot of devs tend to always run in the debugger by clicking the play button to launch the app, but this is not needed unless you really need to set breakpoints and step through the code. Most of the time we don't really need to do this, we can just compile and then right click the /Default.aspx page and choose view in browser, it will launch the VS web server, or if you have IIS configured you don't even need to do that, you can just open a browser and navigate to the site. Loading all the projects up in the debugger is a much heavier and slower process, of course we need to do that when we really need to step through the code, but we don't need to do that to make a small change and see if it worked. We can just build and refresh the page.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.