c# - 如何提高 Mono 中 winforms 应用程序的性能?

标签 c# winforms performance mono gtk#

我有一个在 C# 中使用 Windows 窗体的远程处理应用程序(2 名玩家 Magic the Gathering Game),但我看到的很差
单声道性能。我能想到的可能会影响性能的一件事是我有按钮背景和表单背景(.png)的自定义图像。此外,我大量使用卡片图像(.jpg)。最后,我非常严格地坚持使用 .NET 2.0。

我可以寻找什么来提高单声道的 Windows 窗体性能?如果这是不可能的,是否有一个快速的 gtk# 转换器或工具可以帮助转换?

最佳答案

你试过profile your code .也许这会告诉你瓶颈在哪里......

我认为一个大问题是

Whereas the .Net implementation is a binding to the Win32 toolkit, the Mono implementation is written in C# to allow it to work on multiple platforms



如前所述here

System.Windows.Forms in Mono is implemented using System.Drawing. All controls are natively drawn through System.Drawing. System.Windows.Forms implements its own driver interface to communicate with the host OS windowing system.



如所述here .

我不知道从 winforms 到 gtk#...可能是一个很好的起点。

关于c# - 如何提高 Mono 中 winforms 应用程序的性能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/614478/

相关文章:

c# - 如何让exe文件只在一台电脑上运行

c++ - `std::variant` vs. 继承 vs. 其他方式(性能)

performance - "linear in"和 "proportional to"之间的区别?

c# - 如何递增地循环窗体对象

c# - 访问本地 HTML 文件而不允许用户修改它们

c# - .NET Core 3.1 WebBrowserControl在导航后读取html

c# - 在 .NET 4.5 中是否有更好的方法将变量名称作为字符串获取?

C# : Conditional referencing of dll's based on radio button selection

performance - 为什么对二进制 :replace? 使用 compile_pattern

c# - 从启动的进程中逐行获取输出