C#code快速运行在IIS上,但在Mono慢 - 如何提高呢? [英] C# code runs quick on IIS, but slow on Mono - how to improve it?

查看:373
本文介绍了C#code快速运行在IIS上,但在Mono慢 - 如何提高呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个是我的Windows开发机器上运作良好的ASP.NET应用程序。该服务器是运行Linux的单声道,虽然,一旦上传了同样的code的运行速度4或5次有比它在Windows中(以25秒比5秒例如一个任务)。

I have an ASP.NET application that is working well on my Windows development machine. The server is Linux running Mono though, and once uploaded the same code is running 4 or 5 times slower there than it does on the Windows box (taking 25 seconds vs 5 seconds for one task for instance).

这是性能已知问题单?而且是有什么我可以做些什么呢?在code是主要是文本处理,字符串替换,正则表达式之类的,如果有什么差别。我已经异形和调试我的code在本地使用VS,但我不知道是否有可能做单的服务器,或者我需要做的旁边,真正解决它什么远程调试。

Is this performance a known problem with Mono ? And is there anything I can do about it ? The code is mostly text processing, string replaces, regexes and the like, if that makes any difference. I've profiled and debugged my code using VS locally, but I don't know if it's possible to do remote debugging on the server with Mono, or what I need to do next to fix it really.

推荐答案

的正则表达式是单声道特别差的领域。 Mono的正则表达式类总是使用跨preTED code,而净可以把它变成编译IL,从而导致更快的执行。

Regexes are a particularly weak area for Mono. Mono's Regex class always uses interpreted code, while .Net can turn it into compiled IL, resulting in much faster execution.

大多数其他形式的文本处理像替换应该是大致相同的。

Most other forms of text processing like replaces should be roughly similar.

这篇关于C#code快速运行在IIS上,但在Mono慢 - 如何提高呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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