I need speed Mr .Net....speed

Discussion in 'ASP .Net' started by Ham, Oct 28, 2004.

  1. Ham

    Ham Guest

    Yeah,
    Gotto work with my VB.Net graphic application for days, do any possible type
    of code optimization, check for unhandled errors and finally come up with
    sth that can't process 2D graphics and photos at an acceptable speed. I have
    heard things about the virtual machine of Mr. Net, that it can run my app at
    a high speed....but could never compare it with Java VM and its speed. Then,
    what should i do? Go and learn C++ ? Do i have time for it? Can't Microsoft
    enhance its .Net VM to run VB.NET applications at a C++ program speed?
    .....And how long should we wait for reaching the Native speed?....
    (and why the same managed C++ application run faster? We need more liberty
    guys..)

    (using VB.NET 2003 + Framework 1.1)

    i stay here....
     
    Ham, Oct 28, 2004
    #1
    1. Advertising

  2. Ham

    CJ Taylor Guest

    Try using DirectX. No need to learn C++ and performs a variety of 2D and 3D
    functions for you [already written in C++]

    "Ham Come>" <mdz-+%@hotmail.> wrote in message
    news:...
    > Yeah,
    > Gotto work with my VB.Net graphic application for days, do any possible

    type
    > of code optimization, check for unhandled errors and finally come up with
    > sth that can't process 2D graphics and photos at an acceptable speed. I

    have
    > heard things about the virtual machine of Mr. Net, that it can run my app

    at
    > a high speed....but could never compare it with Java VM and its speed.

    Then,
    > what should i do? Go and learn C++ ? Do i have time for it? Can't

    Microsoft
    > enhance its .Net VM to run VB.NET applications at a C++ program speed?
    > ....And how long should we wait for reaching the Native speed?....
    > (and why the same managed C++ application run faster? We need more liberty
    > guys..)
    >
    > (using VB.NET 2003 + Framework 1.1)
    >
    > i stay here....
    >
    >
    >
     
    CJ Taylor, Oct 28, 2004
    #2
    1. Advertising

  3. For pure performance, C++ will beat .NET languages in graphics (at least in
    most cases). The major .NET benefits is the ability to get deep into the
    WIndows API without API calls, the speed of development, etc.

    This is not saying .NET is not fast. I have an file manipulation application
    that achieves astounding speeds (rips through an 8GB file (76 columns fixed
    width) in less than 20 minutes on 1.6 GHz P4 with 512MB RAM.

    One issue with VB.NET is when you use the "Crutches" in the language. The
    extra weight can kill your app if max perf is the issue.

    ---

    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************

    "Ham Come>" wrote:

    > Yeah,
    > Gotto work with my VB.Net graphic application for days, do any possible type
    > of code optimization, check for unhandled errors and finally come up with
    > sth that can't process 2D graphics and photos at an acceptable speed. I have
    > heard things about the virtual machine of Mr. Net, that it can run my app at
    > a high speed....but could never compare it with Java VM and its speed. Then,
    > what should i do? Go and learn C++ ? Do i have time for it? Can't Microsoft
    > enhance its .Net VM to run VB.NET applications at a C++ program speed?
    > .....And how long should we wait for reaching the Native speed?....
    > (and why the same managed C++ application run faster? We need more liberty
    > guys..)
    >
    > (using VB.NET 2003 + Framework 1.1)
    >
    > i stay here....
    >
    >
    >
    >
     
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Oct 28, 2004
    #3
  4. "Cowboy (Gregory A. Beamer) - MVP" <> wrote

    > One issue with VB.NET is when you use the "Crutches" in the language. The
    > extra weight can kill your app if max perf is the issue.


    Specifically relating to graphics;

    A.
    Dim bmp as Bitmap = New Bitmap(3000,5000)

    vs

    Dim bmp as Bitmap = New Bitmap(3000,5000, Me.CreateGraphics)


    B.
    frmGraphics.DrawImage(bmpSource, Dest, Src, GraphicsUnit.Pixel)

    vs

    frmGraphics.DrawImageUnscaled(bmpSource, 0, 0)


    The second option in both A and B can significantly increase
    performance in performance critical code. That is to say, there
    are performant routines in the .Net framework, the trick is knowing
    where they are, and how to put them to use...

    LFS
     
    Larry Serflaten, Oct 29, 2004
    #4
  5. Ham

    ham Come> Guest

    Let me clarify it:
    I work currently on a bitmap editor and want to edit images pixel by pixel.
    I mean using " GetPixel(i,j) and SetPixel(i,j,color) "....
    The application has to go through the whole pixels and do the operation by
    using" For-Next" loops. It works fine on upto 1000 * 800 bitmaps, but on
    higher
    resolutions, event with a separate thread for this Sub, the result is really
    frustrating. My P4 2.4 GHZ computer hangs and this some times takes a minute
    for a simple operation.....

    And for the guy who said to use DirectX ....
    First of all, direct X does not give all the facilities of GDI+....
    Second, I have a lot of limitations concerning the size of my App and its
    distribution...
    That's why I never go towards DX for those GDI+ operations...

    Thanks...

    "Larry Serflaten" <> wrote in message
    news:...
    >
    > "Cowboy (Gregory A. Beamer) - MVP" <>
    > wrote
    >
    >> One issue with VB.NET is when you use the "Crutches" in the language. The
    >> extra weight can kill your app if max perf is the issue.

    >
    > Specifically relating to graphics;
    >
    > A.
    > Dim bmp as Bitmap = New Bitmap(3000,5000)
    >
    > vs
    >
    > Dim bmp as Bitmap = New Bitmap(3000,5000, Me.CreateGraphics)
    >
    >
    > B.
    > frmGraphics.DrawImage(bmpSource, Dest, Src, GraphicsUnit.Pixel)
    >
    > vs
    >
    > frmGraphics.DrawImageUnscaled(bmpSource, 0, 0)
    >
    >
    > The second option in both A and B can significantly increase
    > performance in performance critical code. That is to say, there
    > are performant routines in the .Net framework, the trick is knowing
    > where they are, and how to put them to use...
    >
    > LFS
     
    ham Come>, Oct 29, 2004
    #5
  6. > I work currently on a bitmap editor and want to edit images pixel by pixel.
    > I mean using " GetPixel(i,j) and SetPixel(i,j,color) "....



    this has to be slow, by design...
    And the speed is limited by GDI+, not by VB.NET or the CLR.

    Try:
    http://msdn.microsoft.com/library/en-us/dncscol/html/csharp11152001.asp


    instead of 'unsafe' C#,
    maybe you could use IntPtr and the Marshal.* class for VB.



    --
    Thomas Scheidegger - MVP .NET - 'NETMaster'
    http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
     
    Thomas Scheidegger [MVP], Oct 29, 2004
    #6
  7. Ham

    Antony Baula Guest

    Antony Baula, Oct 29, 2004
    #7
    1. Advertising

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. efiedler
    Replies:
    1
    Views:
    2,107
    Tim Ward
    Oct 9, 2003
  2. Replies:
    2
    Views:
    2,324
    Howard
    Apr 28, 2004
  3. Replies:
    2
    Views:
    348
    Christopher Benson-Manica
    Apr 28, 2004
  4. Weng Lei-QCH1840
    Replies:
    1
    Views:
    194
    Thomas
    Aug 15, 2003
  5. Adolf Arch-Impersonator
    Replies:
    1
    Views:
    259
    Adolf Arch-Impersonator
    May 20, 2013
Loading...

Share This Page