SPMonitoreScope是否有任何性能影响?我的意思是,我可以将SPMonitored范围保留在生产环境中吗?或者更好的做法是从代码中删除它?Sharepoint 2010 - SPMonitoredScope ...性能影响?
非常感谢,
约瑟夫,
SPMonitoreScope是否有任何性能影响?我的意思是,我可以将SPMonitored范围保留在生产环境中吗?或者更好的做法是从代码中删除它?Sharepoint 2010 - SPMonitoredScope ...性能影响?
非常感谢,
约瑟夫,
这里的MSDN说的话 - http://msdn.microsoft.com/en-us/library/ff512758.aspx
性能考虑
使用SPMonitoredScope包装代码具有非常低的性能损失。但是,应该注意的是,如果由SPMonitoredScope包装的代码段包含执行大量迭代的循环(例如,遍历SharePoint Foundation 2010 Web服务返回的XML节点),则调用堆栈包含在开发人员仪表板中的数据可能呈指数级增长,这使得难以破译所显示的信息。 最佳实践
一种用于最佳和最有效地使用SPMonitoredScope的尖端:
All calls to external components, such as custom databases, external Web services, and so on, should be wrapped with SPMonitoredScope. This will make it easier for administrators to identify them as points of failure, and to isolate the problem quickly.
问候, 尼丁Rastogi
当然有使用性能监控范围的打击。这就是说,它的工作负担相对较小。最佳做法是在生产环境中将其关闭,除非您正在调查特定问题。