Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
slow typing in VS2015
Remco
#21 Posted : Tuesday, November 24, 2015 8:00:45 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
crazyoatmeal;8044 wrote:
Has there been any follow up on this issue from ncrunch? I'm experiencing the same issue even with the latest release which said it fixed some vs 2015 performance issues. None of the suggested changes in this thread have helped.


Sorry, but there have been no actions to follow up on this, as so far we haven't been able to reproduce or isolate any issue like this.

The problem here is that a slow speed in VS can be caused by a near infinite number of things, most of which NCrunch has nothing to do with.

NCrunch is now designed to keep all its processing outside the VS process, this means that if there is a loss of performance in VS that coincides with heavy activity in the NCrunch engine, then the only way this could really be related is through overconsumption of resources. For example, you have the engine turned up too high and the entire system doesn't have enough resources to maintain performance in the UI for any application.
Remco
#22 Posted : Tuesday, November 24, 2015 8:49:43 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Something I thought I would check on this is whether everyone experiencing this issue is encountering it with NCrunch set in manual mode? (i.e. with all testing disabled). Such a thing would point directly to the problem being caused by background builds, which might be related to Roslyn's feature of using a shared process for ALL builds started on the same machine.

NCrunch 2.17 introduced a build flag to suppress Roslyn's shared build process, but this change was reversed in 2.18 because it increased the build times of some projects by 200% or more. If you're hit with this problem, it might be interesting to try NCrunch 2.17 vs 2.18 to see if the problem is related at all to Roslyn piping all builds through the same place.
sour_bee
#23 Posted : Tuesday, June 28, 2016 11:51:53 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/28/2016(UTC)
Posts: 3
Location: United Kingdom

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Hi,

My whole team is experiencing this issue. When this typing lag occurs, the CPU usage on the cores assigned to NCrunch maxes out at 100%. Despite the engine separation from Visual Studio, this effectively locks up the IDE completely.

The typing lag has become so bad that many of us have resorted to turning off NCrunch completely while developing.

Up until upgrading to Visual Studio 2015, our experience with NCrunch had been superb and we had become big advocates. Our solution has not changed significantly, so we can only assume that the underlying issue is NCrunch's integration with Visual Studio 2015.

None of the recommendations listed in this thread have helped. We are running NCrunch in Visual Studio 2015 with the same settings that we used in Visual Studio 2013 without issues.

Could you please advise on what is being done to resolve this? We're running out of options and may have to confront giving up on NCrunch completely. This would be very sad day for us, having used this superb tool for a good few years...

Thanks.
1 user thanked sour_bee for this useful post.
wayneeastaugh on 7/6/2016(UTC)
Remco
#24 Posted : Tuesday, June 28, 2016 11:45:04 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, I'm sorry to hear that you are having this problem.

Has the NCrunch given you any warnings about your environment? Particularly, anything about the Git Source Control Provider?

Do you find that the performance issue is following any particular pattern?

For example, does it take a while before it appears during a session?

Is IDE memory usage very high when it happens?

Does it seem to appear intermittently then suddenly disappear, only to reappear a minute or so later?

Does it appear on ALL solutions, or just one in particular?


If it's possible to make the IDE max itself out to 100% through pure typing in the editor, there is a way you can get more information about this problem:

1. Open up two IDE sessions
2. Attach a debug session from one of the IDEs onto the other
3. Open your solution in the debugged IDE, set yourself up so that the performance issue will appear
4. Type HEAPS of text in the slow IDE, enough to queue up sluggish behaviour for several seconds
5. Quickly, in the second IDE, break into the debug session. Examine the stack traces for the list of running threads, particularly the main thread
6. Repeat the above steps several times until you can see a pattern forming around where the thread is being held
1 user thanked Remco for this useful post.
sour_bee on 6/29/2016(UTC)
sour_bee
#25 Posted : Wednesday, June 29, 2016 3:45:58 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/28/2016(UTC)
Posts: 3
Location: United Kingdom

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Hi Remco,

Thank you very much for the quick reply.

To answer your questions:

Has the NCrunch given you any warnings about your environment? Particularly, anything about the Git Source Control Provider?
I haven't noticed any warnings from NCrunch at all.

Do you find that the performance issue is following any particular pattern?
The issue appears whenever NCrunch is turned on. The typing lag happens on even the most seemingly-innocuous thing, such as when typing a comment. It happens on both unit test code and application code. It appears to be at its worst when NCrunch is building the solution.

For example, does it take a while before it appears during a session?
Trying it this morning after a restart, the issue appears as soon as NCrunch is turned on. My previous experience suggests that it does seem to get worse throughout the day.

Is IDE memory usage very high when it happens?
Not particularly. Although as suggested in my previous answer, the memory usage does creep up throughout the day. I am tending to suspect that this is Visual Studio 2015 misbehaving rather than NCrunch, as we have been regularly turning NCrunch off throughout the day.

Does it seem to appear intermittently then suddenly disappear, only to reappear a minute or so later?
The typing lag does fluctuate in its intensity. Sometimes typing is fairly fluid, sometimes it lags for half a second, and sometimes it lags for up to a couple of seconds. Pretty distracting, as I’m sure you can imagine. However, the only sure way to make it disappear completely is to turn off NCrunch altogether. Turning it back on brings the issue back.

Does it appear on ALL solutions, or just one in particular?
It seems to happen on all of our production solutions, however it should be said that most of our solutions share a common core of projects which are lugged around in each solution. The problem doesn't appear when creating a new solution that has very few files in it, so I suspect that having large solutions makes the problems worse. Having said that though, our solutions are not exactly massive: we have circa 12 projects, including unit test projects. We do have over 10,000 unit tests, which I suppose is testament to how much we were using NCrunch. But these are certainly not the biggest solutions I’ve ever seen. In addition, speaking to a colleague who runs his own business developing a much smaller solution, he says he experiences the same issue at home too.

Furthermore regarding our solutions, we have done some tuning to try to ensure the problem isn't being caused by something we're doing. We've removed an issue that was causing one or two of our projects to rebuild everytime, for example. But again, the fact that none of these issues were apparent with the same solutions in Visual Studio 2013 makes me suspect it's something to with the IDE integration.

I know there have been some complaints about the performance of the Roslyn compiler, and other complaints related to memory consumption in the IDE. Could it be that NCrunch is simply exacerbating some of the underlying issues in the IDE?

Thanks again.
1 user thanked sour_bee for this useful post.
wayneeastaugh on 7/6/2016(UTC)
Remco
#26 Posted : Wednesday, June 29, 2016 10:16:01 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks for your answers. Because the issue appears immediately after turning on NCrunch, this would suggest it isn't tied to general IDE-wide resource related issues (such as memory traffic).

Do you have any other 3rd party packages installed? If so, does disabling them make any difference?

Also, can you try turning off any source control provider that is switched on in the IDE, then restarting it?

Try closing ALL the NCrunch tool windows and all editor windows except one. Does this make any difference?

Does setting the 'Max Number Of Processing Threads' setting to '1' make any difference?

Did the debugging between IDEs reveal anything interesting?

Something else worth trying is to disable build activation on files being changed. In one of the projects that is causing the sluggish behaviour, try adjusting the Files excluded from auto build] setting so that this includes your source files (i.e. *.cs). Then try making a series of changes to the file. With such a setting enabled, NCrunch won't try to start any build activity while you are editing the source files, but the IDE integration will still be active. This is a good way to identify if the sluggish behaviour is somehow crossing over from background processes or if it is present in the IDE itself.

1 user thanked Remco for this useful post.
sour_bee on 7/5/2016(UTC)
Remco
#27 Posted : Saturday, July 2, 2016 12:21:14 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
I've been doing a bit more thinking about possible causes of performance problems under VS2015.

Since you've mentioned that the perf issues seem to be related to build activity and started only after upgrading to VS2015, I'm wondering if you may be able to take a look at the processor consumption of VBCSCompiler.exe while NCrunch is running.

This particular process is newly introduced by Roslyn, and because it isn't under NCrunch's direct control, it doesn't have its processing priority set to Low/Background ... This is actually a bad thing, as it could result in build activity stealing CPU away from Visual Studio. Something worth trying is to manually set the process priority of this service to 'Low' after you've noticed it starting up in your task manager.
1 user thanked Remco for this useful post.
sour_bee on 7/5/2016(UTC)
sour_bee
#28 Posted : Tuesday, July 5, 2016 10:33:32 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/28/2016(UTC)
Posts: 3
Location: United Kingdom

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Hi Remco,

Thanks for all your suggestions so far, but I'm afraid none of them have worked.

The CPU and memory consumption of the VBCSCompiler process both seem to rocket up when NCrunch is running, but setting the priority of this process hasn't helped either.

Currently, our only option is to continue to develop with NCrunch turned off, and then turn it on from time to time to run our tests. This effectively reduces it to a glorified Test Explorer, with the added benefit of the code coverage markers and the test debugging facilities. However, going forward, if this isn't something that can be resolved it looks like we are going to have to think about dropping it completely.

Thanks again.
1 user thanked sour_bee for this useful post.
wayneeastaugh on 7/6/2016(UTC)
Remco
#29 Posted : Tuesday, July 5, 2016 1:15:34 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
I think it may be worth disabling the VBCSCompiler process to see if this resolves the issue.

A bit of background on this process: VBCSCompiler.exe was introduced as part of Roslyn. It basically executes the core compiler code and because it is quite an expensive process to initialise, Roslyn is designed to keep it resident and share it between compile runs. For standard IDE builds, this works great because it saves Roslyn from needing to tear down and reinitialise between every build of every project. However, there is a drawback here in that the process is outside of the direct control of NCrunch which makes hard to manage its CPU consumption. It would not be a surprise to me if this process is the cause of your performance issues.

It's possible to turn off the use of this process with the 'UseSharedCompilation' build property, i.e:

<PropertyGroup>
<UseSharedCompilation>false</UseSharedCompilation>
</PropertyGroup>

I would suggest setting this as an environment variable so that the process is completely disabled system-wide. MSBuild cleanly substitutes environment variables for build properties when it initialises, so by doing this we can shut down the VBCSCompiler.exe process entirely and have Roslyn execute its code within a normal MSBuild host. You can add the environment variable to your standard user/system profile, UseSharedCompilation=false

Note that doing this will significantly increase your build times. I don't really recommend running with it long term, but it might help us to determine with certainty the source of your performance issues.
randomsolutions
#31 Posted : Monday, July 11, 2016 6:19:37 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/18/2013(UTC)
Posts: 9
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
My team is also having the issues described in this thread ever since upgrading to VS2015. Doing the build property change mentioned above seems to have fixed it.
Remco
#32 Posted : Tuesday, July 12, 2016 1:40:30 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
randomsolutions;8946 wrote:
My team is also having the issues described in this thread ever since upgrading to VS2015. Doing the build property change mentioned above seems to have fixed it.


Thanks for confirming this. I have a theory here now on what is happening here.

The VBCSCompiler.exe process is a 'shared' process that is started by the first invocation to MSBuild/CSC/VBC, basically when a project gets built by Roslyn.

This process stays resident for a period of time. If it's left idle long enough, it will self-terminate. I'm not sure what the threshold is for this, but I presume upwards of 15 minutes.

The process is used to perform ALL compile steps for any code compiled on the machine it's running on, and it is not externally managed in any way (i.e. if you shut down VS, the process lives on).

If the process is launched outside the context of NCrunch (i.e. your first build on the machine is done in VS or using a different tool), it is launched with the CPU affinity and processing prioritisation of the calling process, which would normally allow it to run under ALL CPUs on the system and at standard priority. For NCrunch, this is a really bad thing because it means the process can steal CPU away from VS. I expect that on a lower end system (or higher end system running at full capacity) you will see a performance issue appear as a result of this.

If the VBCSCompiler process is launched by NCrunch (i.e. your first build on the machine is performed by NCrunch), it will inherit the processing attributes of NCrunch itself, and it should steer clear of the CPU cores that have been reserved for VS.

So basically, you may be able to avoid the performance issue entirely by ensuring your first build is performed by NCrunch. If you leave your desk for a period of time and come back, make sure that NCrunch is used for the next build so that the process always has the correct processing attributes.

I have a fix in the works for this as part of the 2.24 release, which I'm hoping to kick out within the next couple of weeks. If you're interested in trying the above, please let me know how it goes.
piero
#33 Posted : Friday, July 15, 2016 9:21:51 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 9
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
Hi I'm also affected by this, as soon as I try and get some intellisense the VBCSCompiler.exe shoots up to 14% cpu temporarily, causing lag during typing, the only way to continue development is to disable Ncrunch... Again I agree that now it's rendered Ncrunch totally useless as I'm reliant on it for TDD. Also to make matters worse my company has now just fallen outside of our yearly support cycle... (1st July) I'm not really in a position to ask for another round of funding just to upgrade the entire dev team to fix what is now crippled software...
Remco
#34 Posted : Friday, July 15, 2016 11:19:26 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
piero;8976 wrote:
Hi I'm also affected by this, as soon as I try and get some intellisense the VBCSCompiler.exe shoots up to 14% cpu temporarily, causing lag during typing, the only way to continue development is to disable Ncrunch... Again I agree that now it's rendered Ncrunch totally useless as I'm reliant on it for TDD. Also to make matters worse my company has now just fallen outside of our yearly support cycle... (1st July) I'm not really in a position to ask for another round of funding just to upgrade the entire dev team to fix what is now crippled software...


Hi! What kind of result do you get if you make sure NCrunch is the first tool to run a build on your machine (as per the above post)? As long as NCrunch is responsible for spawning the VBCSCompiler.exe process, it should set the processor affinity for this process correctly and negate any CPU issues.

Killing the VBCSCompiler.exe process will also reset it. If you do this while NCrunch is running, NCrunch will respawn the process with the correct processing attributes. So in short, you should be able to suppress this problem when it appears by killing the VBCSCompiler.exe process using task manager.
Remco
#35 Posted : Wednesday, July 20, 2016 7:52:30 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
The fix the issue with VBCSCompiler.exe overstepping NCrunch's processing boundaries is now available in v2.24.
piero
#36 Posted : Thursday, July 21, 2016 8:08:26 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 9
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
Remco;9001 wrote:
The fix the issue with VBCSCompiler.exe overstepping NCrunch's processing boundaries is now available in v2.24.


Hi, my company's seat licensing expired earlier this month so I can't upgrade to this version to rectify this issue.
This bug has been open for 7 months so there has been adequate time to resolve this during our licensing period, to meet SLA expectations.
Can you arrange some way for us to take advantage of this upgrade as we have spent a significant amount on licensing and would expect the software to be fit for purpose.

Kind Regards.
Remco
#37 Posted : Thursday, July 21, 2016 9:28:05 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
piero;9016 wrote:

Hi, my company's seat licensing expired earlier this month so I can't upgrade to this version to rectify this issue.
This bug has been open for 7 months so there has been adequate time to resolve this during our licensing period, to meet SLA expectations.
Can you arrange some way for us to take advantage of this upgrade as we have spent a significant amount on licensing and would expect the software to be fit for purpose.


Hi, sorry to hear that your license doesn't cover you for this.

I am sorry, but according to the conditions of the EULA, there is no differentiation between a bug fix or a feature. I have been trying to discover the cause of this problem for months, but until fairly recently did not have sufficient information provided to be able to resolve it. Consider that even now, I have not actually been able to reproduce this as a performance problem and the analysis of it has been entirely theoretical based on reviewing the behaviour of the toolstack. Nor is the problem actually caused by NCrunch (it is an issue within Roslyn/framework itself).

If you like, I can provide a new set of evaluation licenses to allow you to test whether the problem still appears for you in the new version (v2.24), but if you want to permanently upgrade to the new version, you will need to upgrade your licensing.
cottsak
#38 Posted : Friday, August 19, 2016 9:05:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/16/2015(UTC)
Posts: 4
Location: Australia

Thanks: 1 times
I think I'm having this too. I'm using VS15 update 3 and just installed NCrunch 2.26.0.1
My theory is that it's not VBCSCompiler.exe. When I am fast enough to switch to Task Manager, I see devenv.exe as the primary cause of the CPU usage.
I've tried changing the CPU core assignment settings without luck.

The odd thing is that instantly after disabling NCrunch the perf comes back. And according to Task Manager, it seems to be VS. Really odd.
Remco
#39 Posted : Friday, August 19, 2016 9:51:16 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
cottsak;9120 wrote:
I think I'm having this too. I'm using VS15 update 3 and just installed NCrunch 2.26.0.1
My theory is that it's not VBCSCompiler.exe. When I am fast enough to switch to Task Manager, I see devenv.exe as the primary cause of the CPU usage.
I've tried changing the CPU core assignment settings without luck.


I think you may be experiencing a different performance issue entirely.

Has NCrunch given you any warnings about the git source control provider? Are you using Git with a large repository?

A way you can actually trap VS to get more information about problems like this is to use a second VS instance with a debugger hooked onto the first instance. When the first instance starts to chew up CPU, try breaking intermittently into the process to see what the threads are doing. A few break actions should give enough stack trace samples to start constructing theories.
1 user thanked Remco for this useful post.
cottsak on 8/23/2016(UTC)
cottsak
#40 Posted : Tuesday, August 23, 2016 8:20:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/16/2015(UTC)
Posts: 4
Location: Australia

Thanks: 1 times
Thanks @Remco. No, no warnings about the git plugin. I do think that was the issue:
[img=https://www.dropbox.com/s/rbgddyr6bhxtt7a/Screenshot%202016-08-23%2016.16.26.png?dl=1]that darn Git plugin[/img]

Turned this off again and the speed seems to be picking up. A good test is tyuing out a long chain of methods and watching the intellisense lag and CPU usage by devenv.exe.
Remco
#41 Posted : Tuesday, August 23, 2016 9:35:52 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
cottsak;9132 wrote:
Thanks @Remco. No, no warnings about the git plugin. I do think that was the issue:
[img=https://www.dropbox.com/s/rbgddyr6bhxtt7a/Screenshot%202016-08-23%2016.16.26.png?dl=1]that darn Git plugin[/img]


Interesting .. I wonder how it was possible that this was a problem for you without NCrunch trying to warn you about it. Is it a very large git repository?

cottsak;9132 wrote:

Turned this off again and the speed seems to be picking up. A good test is tyuing out a long chain of methods and watching the intellisense lag and CPU usage by devenv.exe.


Few things are more frustrating than the IDE hitching and stalling while you're trying to work at full speed. I'm glad you found the source of the problem!
Users browsing this topic
Guest
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.138 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download