如何提高Mono中Winforms应用程序的性能? [英] How do I improve performance of winforms application in Mono?

查看:94
本文介绍了如何提高Mono中Winforms应用程序的性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个远程应用程序(2个播放器,Magic the Gathering Game),使用C#中的Windows窗体,但发现效果很差 单声道性能.我能想到的一件事可能会影响性能,因为我有用于按钮背景和表格background(.png)的自定义图像.此外,我大量使用卡片图像(.jpg).最后,我非常严格地坚持使用.NET 2.0.

I have a remoting application (2 player Magic the Gathering Game) using windows form in C# and I am seeing very poor performance in mono. One thing I can think of that might affect the performance is that I have custom images for button background and form backgrounds(.png). Moreover I heavily use card images (.jpg). Lastly I have stuck very strictly to .NET 2.0.

我希望在单声道中提高Windows Form性能的是什么?如果这不可能,是否有快速的Winforms转换为gtk#转换器或有助于转换的工具?

What can I look for to improve windows Form performance in mono? If this is not possible is there a quick winforms to gtk# converter or tool that helps in converting?

推荐答案

您是否尝试配置您的代码.也许这可以告诉您瓶颈在哪里...

Did you try to profile your code. Maybe that shows you where the bottlenecks are...

我认为一个大问题是

.Net实现是一个 绑定到Win32工具包Mono 实现是用C#编写的 使其可以在多个平台上工作

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

此处

Mono中的System.Windows.Forms是 使用System.Drawing实现.全部 控件是通过本地绘制的 System.Drawing. System.Windows.Forms 实现自己的驱动程序接口 与主机OS窗口通信 系统.

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.

此处所述.

我不知道从winforms转换为gtk#...的转换器,但是如果您真的想将游戏转换为gtk#,请

I don't know of a converter from winforms to gtk#..., but if you really want to bother with converting your game to gtk#, this might be a good starting point.

这篇关于如何提高Mono中Winforms应用程序的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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