Windows Workflow 4 开发中运行缓慢
我们遇到一个问题,即 VS 2010 中的 Windows 工作流在开发过程中运行缓慢。调试时,最多需要 10 秒才能到达 WF 中的断点。其余的基础设施都很好。即UI和Service层调试很快。 我们的 xaml 很简单,但包含很多不同的情况,所以有 284kb。编辑一下一般就可以了。
我很高兴调试时加载 xaml 需要一段时间。但是,当我删除调试点时,我希望它能够再次快速运行。这并没有发生。我有其他类似大小的 xaml,它们从未在其中设置调试点,并且运行速度很快。一旦我添加了一个调试点,即使我后来将其删除,它的运行速度也慢得令人难以置信。
我是开发团队的一员,我有一个运行缓慢的 Master.xaml,而我的队友有一个运行缓慢的 GeneralLedger.xaml。由于这些不同,它不能成为签入的公共代码的一部分。
我们已经检查了项目属性并重建了solution.suo 文件,但似乎没有任何帮助。
有什么想法吗?
We have an issue where Windows Workflow in VS 2010 is running slow in development. When debugging it takes up to 10 secs before it hits the breakpoint in WF. The rest of the infrastructure is fine. i.e. UI and Service layer debugging is fast.
Our xaml is simple but contains a lot of different cases so is 284kb. Editing it is generally OK.
I'm happy that it takes a while to load the xaml when debugging. However when I remove the debug point I expect it to run fast again. This is not happening. I have other xamls of a similar size which have never had debug points set in them and they run fast. As soon as I add a debug point, even though I later remove it, it runs unbelievably slow.
I am part of a development team and I have a slow running Master.xaml and a teammate has a slow running GeneralLedger.xaml. As these are different it can't be part of the common code which is checked in.
We have checked the project properties and rebuilt the solution.suo file, but nothing appears to be helping.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
回答我自己的问题,但希望对其他人有帮助。
在运行解决方案时检查输出后,我们发现以下 xaml 行没有性能问题。
调试器检测失败。原因:找不到文件“D:\AProject\MasterOrchestration\Master.xamlx”。线程“”(0x2dcc) 已退出,代码为 0 (0x0)。
由于我和我的同事将代码放在不同的驱动器上,因此无法加载对方已放入调试点的项目的 XamlDebugger(因为它们在另一台计算机上不存在)。这使我们在 Master.xaml 文件中找到以下元素。
删除整个元素修复了速度问题,应用程序再次快速运行。
Answering my own question, but hopefully it'll help someone else.
After checking the output when running the solution we found the following line for the xamls which didn't have performance problems.
Instrumentation for debugger fails. Reason: Could not find file 'D:\AProject\MasterOrchestration\Master.xamlx'..The thread '' (0x2dcc) has exited with code 0 (0x0).
As my colleague and I had our code on different drives it couldn't load the XamlDebugger for the projects which the other had put a debug point in (as they didn't exist on the other machine). This lead us to find the element below in the Master.xaml file.
Removing the entire element fixed the speed issue and the app is running fast again.
请记住,您需要该文件名来调试工作流程。使用相同的目录结构是更好的解决方案。
Keep in mind that you need that file name to debug your workflow. Using the same directory structure is a better solution.