.NET 2.0 GridView for winforms... why is it so slow?

Is it just me, or is the .NET 2.0 gridview control for Winforms about the slowest grid-like control that has ever been released? I mean, the painting of it is so incredibly slow, it hurts the eye.

In SqlServer 2005's management studio, open a table in Object explorer so you get a grid of rows. Open a table which has enough rows for a full screen. Then open a query window, which is effectively a new tab. Switch between the two by just clicking the tab headers. On my Xeon 3GHz box I see the painting done top to bottom on the grid which is taking at least half a second.

I noticed the same thing in a simple .NET 2.0 app with a Gridview on it. Other people have the same thing?

11 Comments

  • It most certainly is not just you. I was secretly hoping that the RTM version would be faster, but it's not. The old DataGrid control is probably an order of magnitude faster when it comes to repaint operations. This is a huge disappointment for me as I will have to continue to use a combination of Janus and Infragistics controls.



    In addition, I miss the hierarchical capabilities of the old DataGrid control. Sure, it was done in a terrible way, but it was useful for prototyping.

  • Not just you. I thought it might have been because I'm running beta 2 under VmWare.



    Apparently not.

  • The forgot to take the following statement out...



    System.Threading.Thread.Sleep(500);

  • Wim: heh :)



    I had the same thoughts as you, Matthew, I also thought it was beta code and the final would be fast because, well, it would be the non-beta.



    It's so incredibly slow, I have no idea what they're doing. Even with GDI painting in C# code you can't be this slow.



    Later today I'll post an OldSkool Demoscene C# rotozoomer effect to show you how freaking fast .NET code can be, just for comparison.

  • Not only you ... same problem here, although I thought it was going to be faster on the final release (currently running RC1).

  • Its because along with the site weblogs.asp.net, Winforms is just another Microsoft unwanted stepchild.

  • Travis, perhaps, perhaps not. They're really pushing WinForms again as SmartClients. Not every WinForm app is a smart client, but I really like SmartClients! Finally state again, and rich-client features. ;)



    But as they're on their way with Avalon, you might be right as well. I've heard they didn't include a winform testing solution in VS2005/TS because Avalon is on its way.

  • I think a great majority of users accustomed to Enterprise Manager is going to hate the new SQL Management Studio. When I first noticed this would be the replacement for EM I started posting about how this was a totally wrong approach, and was appalled at some of the responses from Microsoft. One I can remember quite vividly was: "...and now the SQL Client tools will get A FIRST-CLASS GRID...".

  • Cool, let's let that go through the normal process. I've double checked to make sure everything's on track. If you're having trouble, you can get to me through my contact link on my blog.

  • Thanks Jessica :) I hope my repro will make sure the datagridview will render faster in the future, because of now I'll never use it in my applications because it makes .NET winforms apps so sluggish, and it's already the case winforms apps aren't the fastest in respect to user experience (the speed the user experiences). For example VB6 guis are much faster. Ok, they're native components but still...

  • Thanks devdave, I'll load that up.

Comments have been disabled for this content.