Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

Win32 vs .Net performance

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MPF - 23 Jun 2006 02:57 GMT
I am not trying to smack a hornets nest, but is there any way to achieve
near-Win32 performance from .Net apps?

I'm porting a VB6 app to .Net and the difference in performance is notable.
I'm using 3rd party controls from the same vendor and have trimmed as much
"fat" from them as possible. Granted, there is functionality with the .Net
controls that doesn't exist in the COM versions, but even with the "canned"
controls, the difference can be seen.

Rest assured, I'm playing by all of the OO (& MS for that matter) guidelines
in the re-write, custom objects, stored procedures for nearly everything,
limited amounts of data and a properly indexed database.

Can anyone offer any tips for increasing performance with .Net windows forms
apps?  I'm considering migrating to Delphi since Borland still supports the
Win32 platform.

Sadly, it appears the runtime for Winforms performance is coming to that of
Java runtime and Swing.

Thanks,

Morgan
JJ - 23 Jun 2006 06:20 GMT
I come from a long line of hardcore development(15+ years) (x86/68000 ASM,
C/C+ realtime controls and even live streaming). Without knowing
specifically what/where you are trying to improve (performance), below is my
stab at your problem.

Oviously, .NET comes with much overhead. MS have done an amazing job with
the JIT to create native code and improve performance. Nonetheless,
abstraction comes with a price.

Currently, I use .NET 2005 for most of our solutions. Below are some things
you can look at.

1. Indentify your bottle neck and improve it (spot check).
2. Minimize reflection usage.
3. Use threadpool instead of launching your own thread when multithreading.
4. When multi-threading consider context switching when determining number
of threads.

What I've found is that most performance problems are usually confined to
small section of codes. Identify those and you should be able to resolve
most if not all of your problems.

Good luck.
Jeff www.ruamkwamkid.com

>I am not trying to smack a hornets nest, but is there any way to achieve
> near-Win32 performance from .Net apps?
[quoted text clipped - 25 lines]
>
> Morgan
Joris Zwaenepoel - 23 Jun 2006 14:28 GMT
Hi Morgan,

I too have a VB5/VB6 background, but the last 3 years I have spent most of
my time programming in VB.NET, and except for the loading of Forms, which
seems to be (much) slower, my experience is that the overall performance of
.NET applications is much better than VB6.  

Of course I cannot tell you what the problem is in your application, but
sometimes what I have done to improve the user experience for slowly loading
forms, is to just display the form without loading data in the Form_Load
event, but start a timer instead (20 milliseconds for example) and then load
the data when the timer elapses. This gives .NET plenty of time to draw the
form faster and it looks nicer.  

Hope this helps,

Joris

> I am not trying to smack a hornets nest, but is there any way to achieve
> near-Win32 performance from .Net apps?
[quoted text clipped - 19 lines]
>
> Morgan
Claes Bergefall - 23 Jun 2006 15:02 GMT
Where are you getting performance problems? Only thing I've experienced is
that graphics rendering is slow. Everything else seems to be just as quick
as in plain Win32 code.

That graphics is slow is because a bunch of stuff in .NET uses GDI+ and it
doesn't support hardware acceleration (yet). Hopefully that will be
supported in the near future.

  /claes

>I am not trying to smack a hornets nest, but is there any way to achieve
> near-Win32 performance from .Net apps?
[quoted text clipped - 25 lines]
>
> Morgan
Morgan Fears - 24 Jun 2006 02:22 GMT
Thanks all for your feedback, I appreciate it.

The app involved is a client/server app(hiss.. word from the 90's ;) ). The
most used form is "heavy", it has a tab sheet and 3 Infragistics grids on
it. Trying to follow all of the OO purists & MS guidelines, the performance
just didn't pan out. I moved from custom objects to straight DataTable binding
and the performance got better. I'm not faulting the Infragistics grid because
the customer loves the functionality, or the Framework, but I guess you get
to a point where you have to go with what works best and in this case it's
databinding to datasets/datatables.

Thanks again,

Morgan

> Where are you getting performance problems? Only thing I've
> experienced is that graphics rendering is slow. Everything else seems
[quoted text clipped - 37 lines]
>>
>> Morgan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.