Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of UI delays inside Visual Studio when using the project system #2297

Closed
6 tasks done
davkean opened this issue May 26, 2017 · 18 comments
Closed
6 tasks done

Lots of UI delays inside Visual Studio when using the project system #2297

davkean opened this issue May 26, 2017 · 18 comments
Assignees
Labels
Regression Regressions from a previous (typically public) build or release. Tenet-Performance This issue affects the "Performance" tenet.
Milestone

Comments

@davkean
Copy link
Member

davkean commented May 26, 2017

We're seeing lots of UI delays, more than usual when using the project system, I've seen UI delays when:

  1. Expanding nodes in Solution Explorer
  2. Add new and removing items to and from the tree
  3. Opening C# source files
  4. Opening XML files
  5. Randomly just pausing while typing

I suspect there's two underlying issues based on the data that I've quickly looked over:

  • In my UI delays, lots of GCs everywhere - something is causing a bunch of garbage
  • ExecuteSynchronously blocks - maybe ThreadPool is running out of threads?

Please look at mine, @davidfowl and @danroth27 delays when investigating this. We do not yet have any traces of these delays.

We've identified the following issues:

@davkean
Copy link
Member Author

davkean commented May 26, 2017

tag @srivatsn @lifengl

@srivatsn srivatsn added the Bug label May 26, 2017
@srivatsn srivatsn added this to the 15.3 milestone May 26, 2017
@davkean
Copy link
Member Author

davkean commented May 30, 2017

@srivatsn This has got worse in today's build, I'm hitting blocks all the time - trying to grab a trace of it...

@lifengl
Copy link
Contributor

lifengl commented May 30, 2017 via email

@davkean
Copy link
Member Author

davkean commented Jun 5, 2017

#2 was introduced in 15.3 - hence why it feels like it's got worse in recent builds.

@davkean
Copy link
Member Author

davkean commented Jun 5, 2017

A great example of this is: https://github.com/aarnott/pinvoke. This project is unusable for minutes after it's opened.

@davkean
Copy link
Member Author

davkean commented Jun 5, 2017

I filed #2383 to represent the pinvoke. Looks like that is dependency node population.

@lifengl
Copy link
Contributor

lifengl commented Jun 5, 2017

#2383 has somewhat a different reason. The code ran into a scalability problem inside JTF library in the Semaphore related JTF code.

@srivatsn srivatsn assigned davkean and unassigned basoundr Jun 5, 2017
@davkean
Copy link
Member Author

davkean commented Jun 6, 2017

@davidfowl @CyrusNajmabadi @Pilchie @sharwell

Can you do the following to see if performance of the project system is much better for you until we resolve this:

  1. Create a file called Directory.Build.targets with the following contents:
<Project>
  <ItemGroup>
    <ProjectCapability Remove="DependenciesTree"/>
  </ItemGroup>
</Project>
  1. Drop it in the root folder that contains all projects (make sure the solution is closed, as you'll hit another bug)

This will turn off the Dependencies node.

@davkean
Copy link
Member Author

davkean commented Jun 13, 2017

We now have PRs out for all known issues, with exception to the GC delays.

@Pilchie
Copy link
Member

Pilchie commented Jun 13, 2017

Tagging @jaredpar here too. He saw a hang in #2432 that might be related.

@lifengl
Copy link
Contributor

lifengl commented Jun 13, 2017

@davkean really nice to hear that. really want to try the product once your fixes are in.

@davkean
Copy link
Member Author

davkean commented Jun 15, 2017

@lifengl @sharwell @Pilchie @davidfowl @danroth27 @CyrusNajmabadi
All known UI delays are now in. They should be available in Friday's build out of PreRel.

There are still three issues that I'm tracking for 15.3 that is affecting general responsiveness of the project system for certain types of projects:

I'm going to close this bug in lieu of those specific issues.

@davkean davkean closed this as completed Jun 15, 2017
jaredpar added a commit to jaredpar/roslyn that referenced this issue Jun 20, 2017
Disabling the Dependencies node due to performance issues. This is
tracked by by the umbrella issue 2297 in project-system

dotnet/project-system#2297
jaredpar added a commit to jaredpar/roslyn that referenced this issue Jun 28, 2017
Disabling the Dependencies node due to performance issues. This is
tracked by by the umbrella issue 2297 in project-system

dotnet/project-system#2297
@davkean
Copy link
Member Author

davkean commented Jun 30, 2017

To update the the thread, next week's build should have resolved all known performance regressions. There's still a lot wins to be gained (looks like the new dependency node does a lot more than the previous one) so we'll keep on plowing away on those, please file them as individual issues.

@davkean davkean added the Tenet-Performance This issue affects the "Performance" tenet. label Jun 30, 2017
sharwell added a commit to sharwell/roslyn that referenced this issue Jun 30, 2017
@aelij
Copy link

aelij commented Jul 19, 2017

@davkean Were these fixes included in the latest preview (July 12)? I've recently converted a large solution (99 projects) to the new project system, and I'm seeing a very degraded experience (in 15.2): the solution loads much slower, and so is opening C# files and building. In the latest preview there seems to be some improvement but I haven't really measured it so I can't be sure. I can take memory dumps or collect PerfView data if you like.

@davkean
Copy link
Member Author

davkean commented Jul 19, 2017

Most of them made into that build - there's still a few that will come in the next build.

Are you saying that 15.3 is better than 15.2? Or are you saying that it's just as bad? Can you file a bug? Traces would be great, even better would be if you could share the source (privately). Can you also "Report a Problem" and put "davkean" in the description - doesn't have to say anything, just lets me see your VS sessions, solution load times, UI delays, etc and figure out what's going on.

@aelij
Copy link

aelij commented Jul 19, 2017

Yes, 15.3 seems better, but still slower than the previous project system. I'll send a report right now. Should I do it after the solution is open?

@davkean
Copy link
Member Author

davkean commented Jul 19, 2017

It doesn't matter when you send the report - it just lets me grab your user data and look at past sessions. Please make sure you open a new bug - so that we're tracking this and we can use to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Regressions from a previous (typically public) build or release. Tenet-Performance This issue affects the "Performance" tenet.
Projects
None yet
Development

No branches or pull requests

7 participants