[Mono-winforms-list] MWF painting VERY slow compared to .NET

Peter Dennis Bartok peter at novonyx.com
Fri Jul 29 01:20:38 EDT 2005

That sounds pretty exciting. Any chance you could share the code? I'd like 
to investigate and see how much work it is to use your version it instead of 
our cairo version when running on the Mac. I'm guessing you are still using 
System.Drawing, just having it call your gdiplus lib?

Would you mind posting a URL to the code?


-----Original Message-----
From: "Parser - Davide Morelli" <davide.morelli at parser.it>
To: <mono-winforms-list at lists.ximian.com>
Date: Thursday, 28 July, 2005 18:33
Subject: R: [Mono-winforms-list] MWF painting VERY slow compared to .NET

Hello list,

I wrote a sw in .NET for windows (a sort of graphical editor) and now I need
to port it to OSX.
Being Cairo so slow i decided to write an alternative libgdiplus.dylib
dedicated to OSX using only Core Graphics Calls.
It won't be complete, I will only implement those methods I used in the
original .NET sw.
I am at a good point and it works like a charm.
I will surely release it under the GPL license (because I took some code
from the original libgdiplus).
Using Cocoa i could also implement some feature that was missing in
libgdiplus ( mostly GraphicsPath.AddString() thanks to NSBezierPath ).

I am not saying that Cairo should not be used, I only had to avoid it
because I needed performances and my software must be released soon.

If you are interested I can share the code.


> -----Messaggio originale-----
> Da: mono-winforms-list-bounces at lists.ximian.com
> [mailto:mono-winforms-list-bounces at lists.ximian.com] Per
> conto di Peter De Jager
> Inviato: mercoledì 27 luglio 2005 11.34
> A: mono-winforms-list at lists.ximian.com
> Oggetto: [Mono-winforms-list] MWF painting VERY slow compared to .NET
> When painting a bitmap to a Form and measuring the frame
> rate, I get vastly different figures on .NET vs. Mono. E.g.
> on .NET I get 114 fps while under mono it's only 4.5 fps (on
> the same hardware). What's even stranger is that I get the
> same (4.5 fps) figure on a PowerPC Mac mini (1.42 GHz G4, 167MHz
> bus) and an Intel box (dual 3GHz Xeon, 533MHz bus). Both
> systems are running Fedora Core 4. I thought that perhaps it
> relates to video drivers but I installed the latest ATI
> driver on my Xeon box (Radeon 9800 Pro) and there is still no
> difference.
> Something else is that on WMF, the background is always
> painted even though I override OnPaintBackground of my Form
> with an empty implementation, e.g.:
> protected override void OnPaintBackground(PaintEventArgs e) { }
> On Windows, this prevents the Form from repainting the
> background, thus speeding up painting and reducing flicker,
> while MWF always appears to repaint the background.
> I've done (very limited) testing on Gtk (Glade), and it
> appears to be fast on Linux (comparable to
> System.Windows.Forms on .NET), but while being fast on Linux,
> Glade is MUCH slower on Windows (I don't have exact figures
> but it's very noticable).
> Is the MWF implementation likely to increase in speed (by 20
> times!) as it matures, or should I use Gtk for Linux / OS X
> and System.Windows.Forms for Windows? I was hoping that I
> could use a single code base for all platforms (which has
> been the case so far).
> Don't take this the wrong way, I don't mean to be critical. I
> think it's great that there is a managed implementation of
> Windows Forms, but at 20 times slower it renders my Windows
> applications unusable under Mono.
> Thanks
> Pete.
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date:
> 22/07/2005

Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com

More information about the Mono-winforms-list mailing list