Win32 vs .Net performance

Discussion in 'Microsoft Dot NET Framework Forms' started by Guest, Jun 23, 2006.

  1. Guest

    Guest Guest

    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
     
    Guest, Jun 23, 2006
    #1
    1. Advertisements

  2. Guest

    JJ Guest

    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


    "MPF" <> wrote in message
    news:...
    >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, Jun 23, 2006
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    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




    "MPF" wrote:

    > 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
     
    Guest, Jun 23, 2006
    #3
  4. 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


    "MPF" <> wrote in message
    news:...
    >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
     
    Claes Bergefall, Jun 23, 2006
    #4
  5. Guest

    Morgan Fears Guest

    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
    > 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
    >
    > "MPF" <> wrote in message
    > news:...
    >
    >> 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
    >>
     
    Morgan Fears, Jun 24, 2006
    #5
  6. Guest

    kattypier

    Joined:
    Jul 16, 2012
    Messages:
    1
    Likes Received:
    0
    kattypier, Jul 16, 2012
    #6
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VoxCode LLC

    Win32 API Namespace for .NET

    VoxCode LLC, Sep 30, 2003, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    260
    Herfried K. Wagner [MVP]
    Sep 30, 2003
  2. Guest

    Calling the .NET dialog box from Win32 app throws an exception

    Guest, Mar 23, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    0
    Views:
    175
    Guest
    Mar 23, 2004
  3. Guest

    Calling the .NET dialog box from Win32 app throws an exception

    Guest, Mar 23, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    0
    Views:
    170
    Guest
    Mar 23, 2004
  4. Guest

    .NET Equivalent for Win32 Beep method

    Guest, Apr 1, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    4
    Views:
    346
    vijai thoppae
    Apr 5, 2004
  5. Guest

    Getting the Win32 FindWindow(ClassName) for a .Net Form

    Guest, Aug 17, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    1,451
    Imran Koradia
    Aug 17, 2004
Loading...

Share This Page