使用Visual Studio Pro排除非常慢的进程 [英] Troubleshooting very slow processes using Visual Studio Pro

查看:78
本文介绍了使用Visual Studio Pro排除非常慢的进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我坚持使用Angular 1.5,Web API,Unity DI,EF和SQL Server的棕色字段应用程序。  这是一个多公共应用程序,包含公共站点,客户站点和内部管理站点。  这个应用程序在
中有一些非常慢的用例,我想缩小这些瓶颈发生的地方。  该应用程序在我的开发盒上的任何时间消耗大量内存8-10演出,而生产中则少得多。  我有Visual Studio 2015,并且我一直在使用
一些诊断工具来缩小一些事情搞乱的地方。  我设置了break all,并发现在这些不处理的不同用例中可能会抛出异常。  我不太了解EF或Unity
但是我怀疑它设置不正确或者至少没有那么高效。  我过去经常使用像Dapper和Peta Poco这样的微观公司。  我想通过
Dapper转移到CQRS来规避这些昂贵的流程。  我只是想在过渡到微型ORM之前和之后找到一些测量和记录方法,以提高应用程序性能。  某些流程需要5分钟才能完成,这绝对是不可接受的。  如果有人对如何诊断和提高应用程序性能有任何想法,请告诉我
。  我也可以使用NDepend和DotTrace来查找堆栈中某些昂贵方法的位置。  任何想法,文章链接或
建议将不胜感激。

I inhereited a brown field application that is Angular 1.5, Web API, Unity DI, EF and SQL Server.  It is a multitennent application with a public site, a customer site and an internal administration site.  There are some VERY slow use cases in this application and I want to narrow down where these bottlenecks occur.  The application consumes a huge amount of memory 8-10 gigs at any 1 time just on my development box much less in production.  I have Visual Studio 2015 and I have been using some of the diagnostic tools to narrow down a little where things are messing up.  I setup break on all and find that there may be exceptions being thrown in these different use cases that are not being handled.  I don't know EF or Unity very well but I suspect it is setup incorrectly or at least not nearly as efficiently as it could be.  I have typically worked with micro-orms like Dapper and Peta Poco in the past.  I would like to circumvent these expensive processes by moving to CQRS with Dapper.  I just wanted to find some way to measure and document before and after the transition to a micro ORM would improve application performance.  Some processes take up to 5 minutes to complete which is absolutely unacceptable.  Please if anyone has any ideas as to how to diagnose and increase application performance please let me know.  Also I have NDepend and DotTrace available to me to find where some of these expensive methods are in the stack.  Any ideas, articles links or suggestions would be greatly appreciated.

谢谢,

Mike Mahon

Mike Mahon

推荐答案

Mike Mahon,

Hi Mike Mahon,

根据你的描述,你想用Visual Studio调试器调试程序的性能问题,是不是?

According to your description, you want to debug the performance issue for your program with Visual Studio debugger, is it right?

我建议你使用Visual Studio
分析工具
,可以帮助我们分析应用程序中的性能问题。我们可以通过使用性能分析工具找出哪种方法花费了大量的CPU和内存。下面的文档介绍了如何使用Sampling数据来显示正在执行
的函数。大多数用户模式在应用程序中工作。

I recommend you use Visual Studio Profiling tools which could help us analyze performance issues in our application. We could find out which method spend a lot of CPU and Memory by using Profiling tools. Following document introduce using Sampling data to shows the functions that are doing most of the user mode work in the application.

https://msdn.microsoft.com/en-us/library/ms182372.aspx

以下链接介绍运行的分析工具,有或没有调试器。

And following link introduce running profiling tools with or without Debugger.

https:/ /msdn.microsoft.com/en-us/library/mt695328.aspx

希望以上文档可以帮助您。如有任何问题,请随时告诉我。

Hope above documents could help you. If any question, please feel free to let me know.

最好的问候,

Weiwei

Best Regards,
Weiwei


这篇关于使用Visual Studio Pro排除非常慢的进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆