[OT] GDI+

  • Thread starter Thread starter Cool Guy
  • Start date Start date
C

Cool Guy

Are there are planned performance updates for GDI+ (i.e. the graphics
engine used in WinForms)? It's horribly laggy currently.
 
Cool Guy,

I don't think that there is anything major planned for .NET 2.0 (GDI+ is
separate from .NET anyways).

However, down the line, there is Avalon, which is a new
rendering/display technology, which should prove to be quite interesting.

What is it that you are doing which is laggy for you?
 
There are no significant upgrades on the horizon and attention has moved
towards Avalon. :-(

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Bob Powell said:
There are no significant upgrades on the horizon and attention has moved
towards Avalon. :-(

That's a pity. WinForms performance is horrible, IME.
 
We are able to get good performance from GDI+ for many types of
applications. Where are you having problems?

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
 
Frank Hileman said:
We are able to get good performance from GDI+ for many types of
applications. Where are you having problems?

Every app that uses WinForms that I've ever used has horrible GUI
performance, as seen even on a brand new laptop and a few-months-old PC.

Even a simple 'hello, world' app does (for example: I see very slow initial
painting).

I'm shocked that there are people here who appear to be saying that this
isn't the case with them; I thought that it was widely accepted that
WinForms controls in general are noticably laggy.
 
I think it is not widely accepted. A hello world application should come up
very fast, and does not use GDI+ -- most windows forms controls are just
wrappers around win32 controls, which use GDI. So you are probably having
some other problem in the .NET framework configuration.
 
Frank Hileman said:
So you are probably having
some other problem in the .NET framework configuration.

I've seen this on three different computers, which each have a different
..NET framework version installed (the first has .NET 1.0, the second has
..NET 1.1, and the third has .NET 1.1 SP1).

As for OSes, the first has WinXP Home, the second has WinXP Home SP2, and
the third has WinXP Pro.

This guy agrees with me: http://west-wind.com/weblog/posts/381.aspx

I have to continuously find third-party controls to replace the WinForms
ones simply because the WinForms ones are terribly sluggish.
 
The XP OS versions are not important at all, Processor types & speed, RAM
size etc. are much more, what else do you have running on your systems
(watch out for virus scanners, background processes, etc) make sure you run
this stuff on a clean install, check performance counter before you run and
while you run .NET apps. Check available RAM and CPU resource consumption.

Post some metrics, how did you measure things and what did you measure? Post
a sample that illustrates your problem including some benchmark figures.
Also you say that WinForms is slow (simple 'hello, world' app does ), but
then you start about Controls and third party stuff, what has a "simple
hello world" to do with window controls? Did you noticed the third party
controls were "faster" (whatever that means).

Willy.
 
Willy Denoyette said:
Post some metrics,

It'd be a waste of time. I did it once before, and a bunch of people
replied to say that they can't see any slowdown.

I see a huge amount in general.

Here's an easy example, just for fun. Open the NUnit GUI if you have it
and resize the left side so that white pretty much fills the screen. Then
go Tools->Options and watch as the Options dialog draws itself sluggishly
(I can see individual controls turn from white to grey).
 
Cool Guy said:
It'd be a waste of time. I did it once before, and a bunch of people
replied to say that they can't see any slowdown.

I see a huge amount in general.

Here's an easy example, just for fun. Open the NUnit GUI if you have it
and resize the left side so that white pretty much fills the screen. Then
go Tools->Options and watch as the Options dialog draws itself sluggishly
(I can see individual controls turn from white to grey).

Whereas again, I can't see that at all. Of course, it's possible that
we're using different versions of NUnit.

Did we get anywhere in trying to find out what the difference on your
box was last time? I seem to remember we came to *some* conclusions,
but I can't remember enough about the thread to find it on Google.
 
Here's an easy example, just for fun. Open the NUnit GUI if you have it
and resize the left side so that white pretty much fills the screen. Then
go Tools->Options and watch as the Options dialog draws itself sluggishly
(I can see individual controls turn from white to grey).

I have done so, and the Options dialog appears instantly. You must have
problem with your machine.
 
Jon Skeet said:
Did we get anywhere in trying to find out what the difference on your
box was last time? I seem to remember we came to *some* conclusions,
but I can't remember enough about the thread to find it on Google.

We didn't get very far. I think the only conclusion we came to was that it
might be related to processor speed.

I think this is the thread you're thinking of: <http://tinyurl.com/88bvq>.
 
Jon Skeet said:
Of course, it's possible that we're using different versions of
NUnit.

This is version 2.2.0.

However, I see this with all apps that use WinForms controls.
 
Cool Guy said:
This is version 2.2.0.

However, I see this with all apps that use WinForms controls.

It does sound like it might be some odd driver issue, where your
graphics card acceleration really doesn't like .NET (or vice versa).
I've seen plenty of WinForms apps running on slower hardware than you
posted about before, and although they can take a while to come up to
start with, they don't have the problems it sounds like you have.
 
Jon Skeet said:
It does sound like it might be some odd driver issue, where your
graphics card acceleration really doesn't like .NET (or vice versa).

Out of curiosity, what graphics card do you have on there?

My current machine has an ATI 9600 SE with 128MB RAM.
 
That is a fine graphics card. .NET is memory hungry, so if you are running
very low, .NET applications may take longer to start because something else
may need to be paged out. And of course there is the JITTER. But simple
applications seem to start instantaneously on most machines, based on my
experience. You can always run the performance monitor and see what is going
on.
 
Frank Hileman said:
That is a fine graphics card. .NET is memory hungry, so if you are running
very low, .NET applications may take longer to start because something else
may need to be paged out. And of course there is the JITTER. But simple
applications seem to start instantaneously on most machines, based on my
experience. You can always run the performance monitor and see what is going
on.

The 128MB is the graphics card memory. The system has 512MB RAM.
 
Finally I found someone else with the same slow GUI problems.
I too see a substantial slow drawing of winforms in vb.net.
It has been extremely frustrating and makes me wish I had built my app
in VB6.

I have several machines that I have tested on. Windows 2003 server with
2.4G Xeon and 1G of ram. My partners new dell laptop with 2G processor
and 512 ram.

Something as simple as switching between two running applications. One
being a com based and then the other being my app in vb.net. When
switching to the vb.net app, there is like a 1sec pause before even
starting to show anything. When it does show I can pretty much watch it
draw the screen (appx 0.5secs). My app has a mdi interface and these
numbers are with no other windows open within the mdi.
If I switch back to another application like Microsoft Outlook, it
switches practically by the time I lift my finger off the mouse button.

I am completely dissappointed with the GUI in VB.NET.
 
Back
Top