Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason 7 posts 68 karma points
    Oct 22, 2014 @ 19:11
    Jason
    0

    Editing templates in Visual Studio really slow

    Hi there,

    I've created an Umbraco 7.1.8 in Visual Studio 2013 using MVC templates. When I edit the templates in Visual Studio the editor slows right down and VS shows a permanent 13% usage in Task Manager (while the document is open). If it helps, I'm using Windows 8.1 64-bit on a machine with a 2.3GHz quad-core cpu. Other projects work fine.

    Any help/suggestions would be appreciated.

    Jason

  • Robert 20 posts 39 karma points
    Oct 22, 2014 @ 22:14
    Robert
    0

    Get an SSD. It's not the CPU or ram. Your bottleneck is the hard drive.

    Disable ReSharper if you have it, or try disabling solution wide anaylsis first.

    If you have AntiVirus, disable the realtime protection setting.

    If you have Anti Virus, it slows down your computer. Every time a file is read, written, or executed, it's first scanned by the A/V. When coding, read, write, and execute can happen all the time, causing your AV to scan the file multiple times in just a few seconds. This is using the HDD 3x more, causing the slowness you are seeing.

    My Advice.

    Exclude the VS folders, asp.net temp folders, etc from real time scanning. Or disable your A/V completely.

    Disable ReSharper if you have it.

    Get an SSD. GET AN SSD, GET AN SSD. - This is the REAL solution to your problems.

    This isn't an umbraco problem, if you still have issues, go to the microsoft visual studio forums.

  • Jason 7 posts 68 karma points
    Oct 22, 2014 @ 22:21
    Jason
    0

    Hi Robert, as I said it works no problem on several other MVC projects I work with. On those projects, the cpu usage doesn't go up like it does with the Umbraco one. This tells me it's not a hardware issue. I have also tried disabling AV with no difference. My speculation is it's something to do with the older version of the MVC/Razor libraries (compared to my other projects) used by Umbraco.

    Thanks for the suggestions though,

    Jason

  • Robert 20 posts 39 karma points
    Oct 22, 2014 @ 22:26
    Robert
    0

    Hi Jason,

    The Umbraco code base is huge, compared to your other projects. You don't have the source code for all the dlls, so VS needs to scan the dlls and reads the code to provide various IDE functionality.

    Open Resource Monitor (inside task manager > performance > resource monitor > disk) to see your Hard Drive activity. You'll see the files eating up your HDD time.

  • Jason 7 posts 68 karma points
    Oct 22, 2014 @ 22:40
    Jason
    0

    Hi Robert, I just tested it out and there's no noticeable difference in disk usage with Visual Studio open and editing an Umbraco template and with Visual Studio completely closed. It's sitting between 0 and 5% usage. I also looked at the Resource Monitor and nothing jumped out at me as significant. The CPU usage definitely does jump up when editing the template.

    Naturally an SSD can make a big difference in overall system performance but it doesn't look like it would help me.

    Jason

  • Jason 7 posts 68 karma points
    Oct 23, 2014 @ 16:30
    Jason
    100

    Okay, I've finally figured out the issue. It turns out if you're editing a template in Visual Studio without adding it to you project (editing with Show All Files turned on and file greyed out in Solution Explorer) you'll see the performance issue I described and have no Intellisense.

    The short answer is if you're editing a file in VS, make sure it's added to your project.

    Jason

Please Sign in or register to post replies

Write your reply to:

Draft