简体   繁体   English

C#-从Visual Studio 2008发布后,应用程序运行速度要慢得多

[英]C# - application runs much more slowly after being published from Visual Studio 2008

I've written a windows form application using C# in Visual Studio 2008. It involves a lot of calculations. 我已经在Visual Studio 2008中使用C#编写了一个Windows窗体应用程序。它涉及许多计算。 When I build it and run it in VS 2008, it takes some time and it's able to produce results I wanted. 当我构建它并在VS 2008中运行它时,它会花费一些时间,并且能够产生我想要的结果。 However, when I published it from VS into a *.application file, it runs much more slowly. 但是,当我将它从VS发布到* .application文件中时,它的运行速度要慢得多。

May I know how to solve this problem? 我可以知道如何解决这个问题吗? I need to demo the software thus I need the stand-along application to run equally fast. 我需要演示软件,因此我需要独立应用程序来同样快速地运行。

Thanks a lot for your help! 非常感谢你的帮助!

You could run a profiler to see what is taking the time... 您可以运行探查器以查看花费时间...

http://www.jetbrains.com/profiler/?gclid=CJ_a4ZnxuagCFQoY4QodFGfACQ http://www.jetbrains.com/profiler/?gclid=CJ_a4ZnxuagCFQoY4QodFGfACQ

It is also sensible to suggest that you make sure you compile your application in release mode as it will remove all of the debug overhead in the running application. 建议您确保以发布模式编译应用程序,这也很明智,因为它将消除正在运行的应用程序中的所有调试开销。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C# 控制台应用程序从 Visual Studio 启动时确实可以工作,发布后它只运行 3 个周期,这是正常行为吗? - C# Console application does work when started from Visual studio, after publishing it only runs for 3 cycles is this normal behaviour? 带有 Visual Studio 的 C#:已发布的应用程序在安装后无法运行 - C# with Visual Studio: Published App Cannot Run After Installation 我可以在Visual Studio 2008中从C#项目构建2个或更多dll吗? - Can I build 2 or more dlls from C# project in Visual Studio 2008? 从Visual Studio 2008中的C#应用​​程序调用时如何调试C DLL - How to debug C DLL when called from a C# application in Visual Studio 2008 C#,Visual Studio 2008 - C#, Visual Studio 2008 Visual Studio 2008和C# - Visual Studio 2008 and C# 在Visual Studio 2008的C#窗体应用程序中编辑XPS文件 - Edit XPS file in C# Forms application in Visual Studio 2008 使用Visual Studio 2008部署Windows应用程序(C#) - Deploying Windows Application(C#) using visual studio 2008 Visual Studio 2008 - 发布C#控制台应用程序的问题 - Visual Studio 2008 - Issues with publishing C# Console Application 使用MongoDB的Windows窗体应用程序(Visual Studio 2008 C#) - Windows forms application using MongoDB (Visual Studio 2008 C#)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM