Recently, I wanted to run a Visual Basic application under Mono. The application itself has to do mainly with cryptography and involves a lot of DES operations, byte crunching/converting, TCP/IP but not much more and no disk I/O. The core functionality is implemented in a DLL and is wrapped around a simple Winforms project with a few options. My initial goal was to take everything needed to run the GUI, copy it to a Linux distro and have it run under Mono without performing any compilation under Linux.
I quickly discovered that I had to target Mono 2.6 in order to reach my goal, so I aimed for openSUSE 11.2 with Mono 2.6.3. Initially, my efforts failed because calls to the VB namespace were returning incorrect results. I had to replace a lot of CType, CInt, CBool, CByte, CLng, Asc, Chr method calls with calls to various classes of the System namespace. After some work at that, I was able to run the GUI application under openSUSE successfully. A few errors still remain but I have worked around those. What striked me was the performance of the application under Mono. I have a way to stress-test my application. I fired it up and started to stress-test the application under Mono. Normally, the GUI application shows status messages and informs the user about what is happening. When the status messages where displayed, the application performed pitifully under openSUSE. Once the status messages were disabled, the application worked faster under openSUSE than under Windows. I was running openSUSE under VMWare and the stress test application in the Windows VM host. The GUI application took 59 seconds to finish when running in the Windows VM host but only 46 seconds when running in the openSUSE virtual machine. In both cases, the stress test executes the same commands serially (single thread) and screen output was turned off. That strikes me as a bit odd. I've heard before that Winforms projects under Mono perform poorly but my experience seems to suggest that server-based applications perform better under Mono than under Windows. The ported application doesn't use anything like WCF, Remoting (and thus serialization) so I don't know how Mono fares on those. Still, these results caught me by surprise - I was just curious about the performance of Mono when I started the stress test but now I keep wondering how is that performance difference possible. I apologize for the elongated post but I'd just like to check my sanity here. Am I missing something or is this considerable speed improvement to be expected and, most important, why is this so? -- View this message in context: http://n4.nabble.com/Mono-2-6-3-and-performance-tp2017537p2017537.html Sent from the Mono - VB mailing list archive at Nabble.com. _______________________________________________ Mono-vb mailing list [email protected] http://lists.ximian.com/mailman/listinfo/mono-vb
