[mono-vb] Mono 2.6.3 and performance

Quan quandary82 at hailmail.net
Tue Apr 20 16:05:49 EDT 2010

 From my experiences, you should really use C# instead of VB.NET if you 
run mono applications under Linux.
The reason is, the VB.NET runtime is implemented in C#, and the C# 
runtime is implemented in C, as far as I have heard.
I've however never encountered problems with CType, CInt, CBool, CByte, 
CLng, Asc, Chr, etc.

And also, VB.NET with mono is incomplete in many ways. Starting with no 
VB.NET compiler shipped with Mono for windows, to the vb.net runtime not 
deployed by default with mono, continuing with ASP.NET peculiarities 
like handling a button click only with ONCLICK instead of with the 
"handles" clause, too.  Missing overloaded functions in the XMLwriter, 3 
missing GDI+ functions (like xWarpPath), etc.
And if you need a VB.NET function in C#, you can still include the VB 
runtime dll in your project.

Also, WinForms applications are always a bit tricky. They should work 
the same on every platform, but in reality, there are always some little 
differences (aka bugs) that can break a program.
The mono team has, in my opinion, achieved much, but as you have seen, 
it's yet far from perfect.
That's why you should do with .NET applications as you would do with any 
C++ application.
Use some cross-platform toolkit, like GTK (gtk# for .net, or wxWidgets 
for .NET).
It's no problem to design and compile GTK# applications with Visual 
Studio, and it's not really more difficult or more time-consuming than 
They are already much older than .NET and they are designed for 
cross-platform usage, and thus work much better than WinForms.

And yes, Linux is faster in most things than Windows, from 3d graphics, 
to file access and database handling, to search and network throughput, 
to memory fragmentation, and also in energy use.
However, many things are implementation specific, so there can be bugs 
in mono that make it look slower than .NET on windows, but on the other 
hand, sometimes there are also bugs in .NET that make mono look much faster.
It depends a bit on what you do. Also, the bug you are experiencing can 
be a Virtualization issue. I've encountered more than one of those. You 
need to install Linux natively and test it by dualbooting.

Also, if you used pictures in your program, keep in mind that Linux is 
case-sensitive, so Filename.png and filename.png are not the same, and 
it WILL result in error.
Another common issue is the directory separator (\ on windows, / on 
Linux, so use system.path.directoryseparatorchar).

Another thing that you should be aware of is that if you use extensive 
graphics, there might be a problem with your graphics driver/GL hardware 
Usually, if you have Intel, it works without problems, but NVIDIA and 
ATI are the universial gravitation constant of bad driver quality, and 
that not just on Linux.

Also, if you have installed a default-installation of Suse, you have 
installed a KDE environment. KDE 4.x is known to be buggy, and the 
default window manager of most sane Linux systems is GNOME, and not KDE.
(For this issue, see some comments of Linus Torvals - a long-time 
extreme GNOME hater - which ditched KDE 4 for GNOME). It might have 
something to do with this.

Also, if you are a first-time Linux user, do yourself a favour and 
install a popular Debian-based distribution, like Ubuntu. OpenSuse is a 
pain in the ass. Believe me, I know, I've used Debian since 1999, later 
Fedora, Ubuntu, Arch and lately I installed OpenSuse.
Believe me: None of them was as horrible as OpenSuse!.

Greez & Have fun with GTK#

On 20.04.2010 17:20, nickntg wrote:
> erver-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 differenc

More information about the Mono-vb mailing list