Why is Umbraco slow when running from Visual Studio?
Hi,
I want to know why Umbraco runs slow when running from Visual Studio? (I am using Umbraco 7.0.3.) I don't know if the performance is better from Web Matrix, but I don't really care because 7.0.x is not available via Web Matrix. It runs great on my production IIS environment, but in development, it is painfully slow, almost to the point of tears. Does anybody have suggestions on how to improve the performance for the development environment?
My guess here is that you are running umbraco from Visual Studio using F5 button. "Run with debug". This is very slow indeed, and not just for Umbraco but for any not-small asp.net project I've seen. Try starting it without attaching debugger to it: Ctrl+F5, "Start without debugging". This should make start up time from VS as fast as from webmatrix. I also hope your VS settings are good/default, and you are using IIS express there, not WebDev-Something very slow VS built-in server (check your Project Properties. Alternatively, if you see Ctrl+F5 starting new iisexpress.exe process, this is good indication you are using iisexpress).
Once you've started your site instance with Ctrl+F5, and if you want to debug it, you can Attach to Process... (Ctrl+Q), select your iisexpress.exe from there and attach to it. Surprisingly enough, it's almost instant, very fast. When you stop debugging, instance keeps working, very convenient.
And the last thing to understand is that you have to restart your Umbraco instance only if you have made changes to source files, like .cs If you are just changing View files like .aspx or .cshtml, you don't have to restart it, just use your Ctrl+F5 instance you started before. Just press F5 in browser, new version of page will be loaded automatically, no need to restart the Umbraco instance.
I'm running 7.1.4 and I have to agree, Umbraco is painfully slow when running the solution in Visual Studio 2013 - even when I "Start without debugging".
Any other pointers out there on what can be done to speed it up?
When running from Visual Studio, you're either running using Cassini (Visual Studio's old runtime debugging web host process) or IIS Express.
When I develop sites locally, I install IIS through the Control Panel and run my sites through that. This allows me to specify much more in terms of performance tweaks than using a debug-designed runtime (IIS Express or Cassini). I get results that are comparable to a production web server (caveat: I have a 4th-gen i7 with 8 cores, 16GB of RAM and a 256GB SSD, but even before I had this machine I still used IIS because it gave me better performance and more managment tools while developing).
To enable IIS for your local machine, install it through the Programs and Features > "Turn Windows features on or off" (note, this only works on Windows 7 Pro and above, and Windows 8, and assuming you're not in an enterprise-locked-down environment that prevents you installing stuff). Then you can create sites in IIS, which is the production-grade web server Microsoft produce. It lets you run app pools in 64-bit mode (to maximise memory usage), specify many more performance tweaks, permissions, and other features that IIS Express and Cassini hide away from you during development.
Why is Umbraco slow when running from Visual Studio?
Hi,
I want to know why Umbraco runs slow when running from Visual Studio? (I am using Umbraco 7.0.3.) I don't know if the performance is better from Web Matrix, but I don't really care because 7.0.x is not available via Web Matrix. It runs great on my production IIS environment, but in development, it is painfully slow, almost to the point of tears. Does anybody have suggestions on how to improve the performance for the development environment?
Thanks,
Devin
Hi Devin.
My guess here is that you are running umbraco from Visual Studio using F5 button. "Run with debug". This is very slow indeed, and not just for Umbraco but for any not-small asp.net project I've seen. Try starting it without attaching debugger to it: Ctrl+F5, "Start without debugging". This should make start up time from VS as fast as from webmatrix. I also hope your VS settings are good/default, and you are using IIS express there, not WebDev-Something very slow VS built-in server (check your Project Properties. Alternatively, if you see Ctrl+F5 starting new iisexpress.exe process, this is good indication you are using iisexpress).
Once you've started your site instance with Ctrl+F5, and if you want to debug it, you can Attach to Process... (Ctrl+Q), select your iisexpress.exe from there and attach to it. Surprisingly enough, it's almost instant, very fast. When you stop debugging, instance keeps working, very convenient.
And the last thing to understand is that you have to restart your Umbraco instance only if you have made changes to source files, like .cs
If you are just changing View files like .aspx or .cshtml, you don't have to restart it, just use your Ctrl+F5 instance you started before. Just press F5 in browser, new version of page will be loaded automatically, no need to restart the Umbraco instance.
That was my best guess for your situation.
Hi there,
I'm running 7.1.4 and I have to agree, Umbraco is painfully slow when running the solution in Visual Studio 2013 - even when I "Start without debugging".
Any other pointers out there on what can be done to speed it up?
Thanks, John
Hi folks,
When running from Visual Studio, you're either running using Cassini (Visual Studio's old runtime debugging web host process) or IIS Express.
When I develop sites locally, I install IIS through the Control Panel and run my sites through that. This allows me to specify much more in terms of performance tweaks than using a debug-designed runtime (IIS Express or Cassini). I get results that are comparable to a production web server (caveat: I have a 4th-gen i7 with 8 cores, 16GB of RAM and a 256GB SSD, but even before I had this machine I still used IIS because it gave me better performance and more managment tools while developing).
To enable IIS for your local machine, install it through the Programs and Features > "Turn Windows features on or off" (note, this only works on Windows 7 Pro and above, and Windows 8, and assuming you're not in an enterprise-locked-down environment that prevents you installing stuff).
Then you can create sites in IIS, which is the production-grade web server Microsoft produce. It lets you run app pools in 64-bit mode (to maximise memory usage), specify many more performance tweaks, permissions, and other features that IIS Express and Cassini hide away from you during development.
HTH,
Benjamin
is working on a reply...