Is .NET slower than - say - VB6?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news.microsoft.com

    Is .NET slower than - say - VB6?

    Hi all,

    First post here. I'm porting an application I wrote in VB6, over to VB.NET
    2005.

    It could be said I'm really struggling with some (most!) of the syntax of
    VB.NET 2005, but I'm getting there. I'm relying a lot, at this point, on
    sample code from Microsoft, and other forums about the Internet.

    One thing I've painfully noticed (hence the title of this post) is .NET
    seems to be GOD AWEFULLY slow!

    My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
    program starts in approximately 10 seconds, loading all 1300-odd Active
    Directory user accounts in a listview.

    VB.NET (doing the same thing and based on an example from MSDN) takes almost
    60 seconds!

    WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
    volume useage info under VB6 is instant. A WMI call to get the same
    information takes 30 or more seconds.

    Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit, fully
    updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003 SP2 (two
    dual core 3.2GHz Xeons). My network is fine.

    I'm attempting to port my program to VB.NET to get cross-platform
    compatibility. 32-bit/64-bit/workstation and server. My program needs to run
    on them all. A 32-bit program using 32-bit DLLs simply won't work on a
    64-bit platform - hence the port.

    Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL is
    needed to get the job done?

    Mark


  • Cor Ligthert [MVP]

    #2
    Re: Is .NET slower than - say - VB6?

    Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
    is
    needed to get the job done?
    >
    When well done it can be about 10 times quicker

    When bad done it can be about 10 times slower.

    Basicly it is quicker as it does not use late binding.

    Cor


    Comment

    • kimiraikkonen

      #3
      Re: Is .NET slower than - say - VB6?

      On Apr 22, 1:40 pm, "news.microsoft .com" <marximu...@hot mail.com>
      wrote:
      Hi all,
      >
      First post here. I'm porting an application I wrote in VB6, over to VB.NET
      2005.
      >
      It could be said I'm really struggling with some (most!) of the syntax of
      VB.NET 2005, but I'm getting there. I'm relying a lot, at this point, on
      sample code from Microsoft, and other forums about the Internet.
      >
      One thing I've painfully noticed (hence the title of this post) is .NET
      seems to be GOD AWEFULLY slow!
      >
      My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
      program starts in approximately 10 seconds, loading all 1300-odd Active
      Directory user accounts in a listview.
      >
      VB.NET (doing the same thing and based on an example from MSDN) takes almost
      60 seconds!
      >
      WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
      volume useage info under VB6 is instant. A WMI call to get the same
      information takes 30 or more seconds.
      >
      Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit, fully
      updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003 SP2 (two
      dual core 3.2GHz Xeons). My network is fine.
      >
      I'm attempting to port my program to VB.NET to get cross-platform
      compatibility. 32-bit/64-bit/workstation and server. My program needs to run
      on them all. A 32-bit program using 32-bit DLLs simply won't work on a
      64-bit platform - hence the port.
      >
      Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL is
      needed to get the job done?
      >
      Mark
      Hi,
      A little addition,GDI+ is also so slow on older machines because of
      not having hardware acceleration. Hope to see same performance like
      in DirectX in future.

      Regards,

      Onur

      Comment

      • Galen Somerville

        #4
        Re: Is .NET slower than - say - VB6?


        "news.microsoft .com" <marximus27@hot mail.comwrote in message
        news:%23DKUAVGp IHA.548@TK2MSFT NGP06.phx.gbl.. .
        Hi all,
        >
        First post here. I'm porting an application I wrote in VB6, over to VB.NET
        2005.
        >
        It could be said I'm really struggling with some (most!) of the syntax of
        VB.NET 2005, but I'm getting there. I'm relying a lot, at this point, on
        sample code from Microsoft, and other forums about the Internet.
        >
        One thing I've painfully noticed (hence the title of this post) is .NET
        seems to be GOD AWEFULLY slow!
        >
        My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
        program starts in approximately 10 seconds, loading all 1300-odd Active
        Directory user accounts in a listview.
        >
        VB.NET (doing the same thing and based on an example from MSDN) takes
        almost 60 seconds!
        >
        WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
        volume useage info under VB6 is instant. A WMI call to get the same
        information takes 30 or more seconds.
        >
        Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit,
        fully updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003
        SP2 (two dual core 3.2GHz Xeons). My network is fine.
        >
        I'm attempting to port my program to VB.NET to get cross-platform
        compatibility. 32-bit/64-bit/workstation and server. My program needs to
        run on them all. A 32-bit program using 32-bit DLLs simply won't work on a
        64-bit platform - hence the port.
        >
        Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
        is needed to get the job done?
        >
        Mark
        >
        >
        I have a VB6 app that gets Heart beats in real time over a USB connection.
        The app displays the Heart sound and the ECG at rates up to 400
        Beats-per-minute.

        So far I have been able to get VB2005/VB2008 up to about 3 Beats-per-minute.

        Galen


        Comment

        • Smokey Grindel

          #5
          Re: Is .NET slower than - say - VB6?

          if you see a difference like that then you are doing something wrong...
          because I can control a 2 mpixel LED display via USB through a .NET app...
          if I can push that kinda data you should be able to do something that does
          very little data wise like pull ECG dta...

          "Galen Somerville" <galen@communit y.nospamwrote in message
          news:OssaPMIpIH A.1240@TK2MSFTN GP02.phx.gbl...
          >
          "news.microsoft .com" <marximus27@hot mail.comwrote in message
          news:%23DKUAVGp IHA.548@TK2MSFT NGP06.phx.gbl.. .
          >Hi all,
          >>
          >First post here. I'm porting an application I wrote in VB6, over to
          >VB.NET 2005.
          >>
          >It could be said I'm really struggling with some (most!) of the syntax of
          >VB.NET 2005, but I'm getting there. I'm relying a lot, at this point, on
          >sample code from Microsoft, and other forums about the Internet.
          >>
          >One thing I've painfully noticed (hence the title of this post) is .NET
          >seems to be GOD AWEFULLY slow!
          >>
          >My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
          >program starts in approximately 10 seconds, loading all 1300-odd Active
          >Directory user accounts in a listview.
          >>
          >VB.NET (doing the same thing and based on an example from MSDN) takes
          >almost 60 seconds!
          >>
          >WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
          >volume useage info under VB6 is instant. A WMI call to get the same
          >information takes 30 or more seconds.
          >>
          >Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit,
          >fully updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003
          >SP2 (two dual core 3.2GHz Xeons). My network is fine.
          >>
          >I'm attempting to port my program to VB.NET to get cross-platform
          >compatibilit y. 32-bit/64-bit/workstation and server. My program needs to
          >run on them all. A 32-bit program using 32-bit DLLs simply won't work on
          >a 64-bit platform - hence the port.
          >>
          >Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
          >is needed to get the job done?
          >>
          >Mark
          >>
          >>
          I have a VB6 app that gets Heart beats in real time over a USB
          connection. The app displays the Heart sound and the ECG at rates up to
          400 Beats-per-minute.
          >
          So far I have been able to get VB2005/VB2008 up to about 3
          Beats-per-minute.
          >
          Galen
          >
          >

          Comment

          • Galen Somerville

            #6
            Re: Is .NET slower than - say - VB6?

            The USB is supplying 24 bytes, say, every 4 ms (2 sets of 6 integers at 75
            BPM). The display has to blank the previous 12 lines before it can write the
            12 new lines. Each line is from pixel X to pixel X+1. The Y portion could be
            a hundred pixels high.

            Galen

            "Smokey Grindel" <nospam@nospam. comwrote in message
            news:u5RooyIpIH A.3940@TK2MSFTN GP03.phx.gbl...
            if you see a difference like that then you are doing something wrong...
            because I can control a 2 mpixel LED display via USB through a .NET app...
            if I can push that kinda data you should be able to do something that does
            very little data wise like pull ECG dta...
            >
            "Galen Somerville" <galen@communit y.nospamwrote in message
            news:OssaPMIpIH A.1240@TK2MSFTN GP02.phx.gbl...
            >>
            >"news.microsof t.com" <marximus27@hot mail.comwrote in message
            >news:%23DKUAVG pIHA.548@TK2MSF TNGP06.phx.gbl. ..
            >>Hi all,
            >>>
            >>First post here. I'm porting an application I wrote in VB6, over to
            >>VB.NET 2005.
            >>>
            >>It could be said I'm really struggling with some (most!) of the syntax
            >>of VB.NET 2005, but I'm getting there. I'm relying a lot, at this point,
            >>on sample code from Microsoft, and other forums about the Internet.
            >>>
            >>One thing I've painfully noticed (hence the title of this post) is .NET
            >>seems to be GOD AWEFULLY slow!
            >>>
            >>My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
            >>program starts in approximately 10 seconds, loading all 1300-odd Active
            >>Directory user accounts in a listview.
            >>>
            >>VB.NET (doing the same thing and based on an example from MSDN) takes
            >>almost 60 seconds!
            >>>
            >>WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
            >>volume useage info under VB6 is instant. A WMI call to get the same
            >>information takes 30 or more seconds.
            >>>
            >>Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit,
            >>fully updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003
            >>SP2 (two dual core 3.2GHz Xeons). My network is fine.
            >>>
            >>I'm attempting to port my program to VB.NET to get cross-platform
            >>compatibility . 32-bit/64-bit/workstation and server. My program needs to
            >>run on them all. A 32-bit program using 32-bit DLLs simply won't work on
            >>a 64-bit platform - hence the port.
            >>>
            >>Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit
            >>DLL is needed to get the job done?
            >>>
            >>Mark
            >>>
            >>>
            >I have a VB6 app that gets Heart beats in real time over a USB
            >connection. The app displays the Heart sound and the ECG at rates up to
            >400 Beats-per-minute.
            >>
            >So far I have been able to get VB2005/VB2008 up to about 3
            >Beats-per-minute.
            >>
            >Galen
            >>
            >>
            >
            >

            Comment

            • Michel Posseth  [MCP]

              #7
              Re: Is .NET slower than - say - VB6?

              >
              >Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
              >is
              >needed to get the job done?

              You can still take the API way in VB.Net
              When well done it can be about 10 times quicker
              >
              When bad done it can be about 10 times slower.
              >
              If you have 2 fully optimized assembly`s in both languages you might see
              some surprising results depending on the situation
              i have seen a program written in good old C doing file io that blew anny
              other program away , however it was only for this specific task so fast as
              it was optimized for this one situation .

              In some way COBOL is also superior to .Net or VB6 ,,,,, but it is the whole
              package that counts for me :-)
              Basicly it is quicker as it does not use late binding.
              VB6 is fully written on COM and it can use both Early and late binding ( by
              the way i can also late bind with VB.Net for instance to office if i am not
              sure if it is installed on the target system )


              For VB6 COM is native so i guess that if you use libs through COM VB6 will
              be a few miliseconds quicker, However VB.Net is not obsolete as VB6 is and
              for native .Net assemblys the speed is mostly equal or faster .


              just my thoughts

              Michel







              "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschre ef in bericht
              news:e6e9slGpIH A.4620@TK2MSFTN GP06.phx.gbl...
              >
              >Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
              >is
              >needed to get the job done?
              >>
              When well done it can be about 10 times quicker
              >
              When bad done it can be about 10 times slower.
              >
              Basicly it is quicker as it does not use late binding.
              >
              Cor
              >

              Comment

              • Patrice

                #8
                Re: Is .NET slower than - say - VB6?

                IMHO your best is to first narrow down the portion that is so slow (for
                example it would be interesting to see if this is the listview (UI) part or
                the ADSI interaction) and then post about this particular code. In
                particular pay attention to possible conversion ("long" is "now" integer so
                it's pretty easy when not used to this to introduce unexpected conversion
                and I've seen this once with a so called benchmark but the .NET version was
                actually doing a lot of conversions the VB 6 version wasn't doing).

                Else nothing is slower than something else. It always depends what is done
                and it will end in a general discussion that will lead nowhere...

                --
                Patrice

                "news.microsoft .com" <marximus27@hot mail.coma écrit dans le message de
                groupe de discussion : #DKUAVGpIHA.548 @TK2MSFTNGP06.p hx.gbl...
                Hi all,
                >
                First post here. I'm porting an application I wrote in VB6, over to VB.NET
                2005.
                >
                It could be said I'm really struggling with some (most!) of the syntax of
                VB.NET 2005, but I'm getting there. I'm relying a lot, at this point, on
                sample code from Microsoft, and other forums about the Internet.
                >
                One thing I've painfully noticed (hence the title of this post) is .NET
                seems to be GOD AWEFULLY slow!
                >
                My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
                program starts in approximately 10 seconds, loading all 1300-odd Active
                Directory user accounts in a listview.
                >
                VB.NET (doing the same thing and based on an example from MSDN) takes
                almost 60 seconds!
                >
                WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
                volume useage info under VB6 is instant. A WMI call to get the same
                information takes 30 or more seconds.
                >
                Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit,
                fully updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003
                SP2 (two dual core 3.2GHz Xeons). My network is fine.
                >
                I'm attempting to port my program to VB.NET to get cross-platform
                compatibility. 32-bit/64-bit/workstation and server. My program needs to
                run on them all. A 32-bit program using 32-bit DLLs simply won't work on a
                64-bit platform - hence the port.
                >
                Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
                is needed to get the job done?
                >
                Mark
                >
                >

                Comment

                • Cor Ligthert[MVP]

                  #9
                  Re: Is .NET slower than - say - VB6?

                  Michael,

                  What is in your opinion Native code as that is in my idea always often used,
                  however never is specified what is meant by that.

                  You mean Intel Assembler?

                  In my idea are there very few languages that creates code on this level,
                  while it than would be extremely huge and therefore slow to handle.

                  As you know my thoughts.

                  Cor

                  "Michel Posseth [MCP]" <MSDN@posseth.c omschreef in bericht
                  news:%23fD5QhJp IHA.3568@TK2MSF TNGP04.phx.gbl. ..
                  >>Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit
                  >>DLL is
                  >>needed to get the job done?
                  >
                  >
                  You can still take the API way in VB.Net
                  >
                  >When well done it can be about 10 times quicker
                  >>
                  >When bad done it can be about 10 times slower.
                  >>
                  >
                  If you have 2 fully optimized assembly`s in both languages you might see
                  some surprising results depending on the situation
                  i have seen a program written in good old C doing file io that blew anny
                  other program away , however it was only for this specific task so fast as
                  it was optimized for this one situation .
                  >
                  In some way COBOL is also superior to .Net or VB6 ,,,,, but it is the
                  whole package that counts for me :-)
                  >
                  >Basicly it is quicker as it does not use late binding.
                  >
                  VB6 is fully written on COM and it can use both Early and late binding (
                  by the way i can also late bind with VB.Net for instance to office if i am
                  not sure if it is installed on the target system )
                  >
                  >
                  For VB6 COM is native so i guess that if you use libs through COM VB6 will
                  be a few miliseconds quicker, However VB.Net is not obsolete as VB6 is and
                  for native .Net assemblys the speed is mostly equal or faster .
                  >
                  >
                  just my thoughts
                  >
                  Michel
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschre ef in bericht
                  news:e6e9slGpIH A.4620@TK2MSFTN GP06.phx.gbl...
                  >>
                  >>Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit
                  >>DLL is
                  >>needed to get the job done?
                  >>>
                  >When well done it can be about 10 times quicker
                  >>
                  >When bad done it can be about 10 times slower.
                  >>
                  >Basicly it is quicker as it does not use late binding.
                  >>
                  >Cor
                  >>
                  >
                  >

                  Comment

                  • Michel Posseth  [MCP]

                    #10
                    Re: Is .NET slower than - say - VB6?

                    Hello Cor ,

                    In the context of VB6 and COM , i mean with "Native" that VB6 is specially
                    designed for COM as minimal marshalling is necesary you have less overhead
                    and thus more speed as non native interaction .

                    With .Net and the context "Native" i mean .Net libraries that are written
                    in .Net


                    Usercode written in VB6 <---interaction ---- Library used is COM =
                    Native
                    Usercode written in .Net <---interaction ---- Library used is .Net =
                    Native

                    Usercode written in .Net <---interaction ---- Library used is COM =
                    Non Native ( interop necesary )

                    For a lot of the old COM libs there are nowadays a lot .Net libs or
                    alternatives availlable that is what i tried to say

                    regards

                    Michel





                    "Cor Ligthert[MVP]" <notmyfirstname @planet.nlschre ef in bericht
                    news:0192A0C8-A781-4003-9A37-A0873F30F27C@mi crosoft.com...
                    Michael,
                    >
                    What is in your opinion Native code as that is in my idea always often
                    used, however never is specified what is meant by that.
                    >
                    You mean Intel Assembler?
                    >
                    In my idea are there very few languages that creates code on this level,
                    while it than would be extremely huge and therefore slow to handle.
                    >
                    As you know my thoughts.
                    >
                    Cor
                    >
                    "Michel Posseth [MCP]" <MSDN@posseth.c omschreef in bericht
                    news:%23fD5QhJp IHA.3568@TK2MSF TNGP04.phx.gbl. ..
                    >
                    >>>Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit
                    >>>DLL is
                    >>>needed to get the job done?
                    >>
                    >>
                    >You can still take the API way in VB.Net
                    >>
                    >>When well done it can be about 10 times quicker
                    >>>
                    >>When bad done it can be about 10 times slower.
                    >>>
                    >>
                    >If you have 2 fully optimized assembly`s in both languages you might
                    >see some surprising results depending on the situation
                    >i have seen a program written in good old C doing file io that blew anny
                    >other program away , however it was only for this specific task so fast
                    >as it was optimized for this one situation .
                    >>
                    >In some way COBOL is also superior to .Net or VB6 ,,,,, but it is the
                    >whole package that counts for me :-)
                    >>
                    >>Basicly it is quicker as it does not use late binding.
                    >>
                    >VB6 is fully written on COM and it can use both Early and late binding
                    >( by the way i can also late bind with VB.Net for instance to office if i
                    >am not sure if it is installed on the target system )
                    >>
                    >>
                    >For VB6 COM is native so i guess that if you use libs through COM VB6
                    >will be a few miliseconds quicker, However VB.Net is not obsolete as VB6
                    >is and for native .Net assemblys the speed is mostly equal or faster .
                    >>
                    >>
                    >just my thoughts
                    >>
                    >Michel
                    >>
                    >>
                    >>
                    >>
                    >>
                    >>
                    >>
                    >"Cor Ligthert [MVP]" <notmyfirstname @planet.nlschre ef in bericht
                    >news:e6e9slGpI HA.4620@TK2MSFT NGP06.phx.gbl.. .
                    >>>
                    >>>Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit
                    >>>DLL is
                    >>>needed to get the job done?
                    >>>>
                    >>When well done it can be about 10 times quicker
                    >>>
                    >>When bad done it can be about 10 times slower.
                    >>>
                    >>Basicly it is quicker as it does not use late binding.
                    >>>
                    >>Cor
                    >>>
                    >>
                    >>
                    >

                    Comment

                    • Michel Posseth  [MCP]

                      #11
                      Re: Is .NET slower than - say - VB6?

                      An example of my own experience

                      I had to write once a data conversion app from plain text files of a few GB
                      as this was a internall project of our own company i decided to try some
                      new technology`s and so i used a then a early beta version of .Net .

                      I had some big laughs with my collegues , cause it was so slow our VB6 app
                      did it in a fraction of the time !!! hahaha :-)
                      a year later we then worked for several projects with .Net and i had a lot
                      more experience with .Net and had read some good books , we then had to do a
                      new conversion on a new version of that same data , i opened my previous
                      ..Net project and laughed about my own stupidity for instance one of the big
                      botle necks in my prog was that i used a concat of string variabels where i
                      should have used a string builder object , why didn`t i thought of that
                      before well as i was looking at the .Net prog with VB6 experience and common
                      knowledge ( VB6 doesn`t have a string builder , and i wasn`t aware of its
                      existence in .Net ) .

                      I altered the prog with the knowledge i posessed at that time about the
                      framework and the VB.Net prog blew the VB6 prog to the moon in terms of
                      speed
                      ..Net was superior in speed now .

                      VB6 ISNOT VB.Net you should really buy yourself a good reference i would
                      recomend the Balena book "Programmin g Microsoft Visual Basic" and allow
                      yourself some studying and play time .

                      HTH

                      Michel






                      "Patrice" <http://www.chez.com/scribe/schreef in bericht
                      news:377799C1-B8B3-460A-BD3E-3A3C37EB4F21@mi crosoft.com...
                      IMHO your best is to first narrow down the portion that is so slow (for
                      example it would be interesting to see if this is the listview (UI) part
                      or the ADSI interaction) and then post about this particular code. In
                      particular pay attention to possible conversion ("long" is "now" integer
                      so it's pretty easy when not used to this to introduce unexpected
                      conversion and I've seen this once with a so called benchmark but the .NET
                      version was actually doing a lot of conversions the VB 6 version wasn't
                      doing).
                      >
                      Else nothing is slower than something else. It always depends what is done
                      and it will end in a general discussion that will lead nowhere...
                      >
                      --
                      Patrice
                      >
                      "news.microsoft .com" <marximus27@hot mail.coma écrit dans le message de
                      groupe de discussion : #DKUAVGpIHA.548 @TK2MSFTNGP06.p hx.gbl...
                      >Hi all,
                      >>
                      >First post here. I'm porting an application I wrote in VB6, over to
                      >VB.NET 2005.
                      >>
                      >It could be said I'm really struggling with some (most!) of the syntax of
                      >VB.NET 2005, but I'm getting there. I'm relying a lot, at this point, on
                      >sample code from Microsoft, and other forums about the Internet.
                      >>
                      >One thing I've painfully noticed (hence the title of this post) is .NET
                      >seems to be GOD AWEFULLY slow!
                      >>
                      >My VB6 version of my app interacts HEAVILY with Active Directory. My VB6
                      >program starts in approximately 10 seconds, loading all 1300-odd Active
                      >Directory user accounts in a listview.
                      >>
                      >VB.NET (doing the same thing and based on an example from MSDN) takes
                      >almost 60 seconds!
                      >>
                      >WMI is also painfully slow. A "DiskQuota" DLL call to the server to get
                      >volume useage info under VB6 is instant. A WMI call to get the same
                      >information takes 30 or more seconds.
                      >>
                      >Why is this? My workstation/VB.NET 2005 platform is Windows XP 64-bit,
                      >fully updated, running on a P4-3.2GHz, 1Gb RAM. My server is Server 2003
                      >SP2 (two dual core 3.2GHz Xeons). My network is fine.
                      >>
                      >I'm attempting to port my program to VB.NET to get cross-platform
                      >compatibilit y. 32-bit/64-bit/workstation and server. My program needs to
                      >run on them all. A 32-bit program using 32-bit DLLs simply won't work on
                      >a 64-bit platform - hence the port.
                      >>
                      >Is .NET inherently slower than VB6 where VB6 is using whatever 32-bit DLL
                      >is needed to get the job done?
                      >>
                      >Mark
                      >>
                      >>
                      >

                      Comment

                      • =?Utf-8?B?QU1lcmNlcg==?=

                        #12
                        Re: Is .NET slower than - say - VB6?

                        IMHO your best is to first narrow down the portion that is so slow (for
                        example it would be interesting to see if this is the listview (UI) part or
                        the ADSI interaction) and then post about this particular code.
                        Patrice may have the answer to the first problem. Your performance problem
                        could be entirely with loading the listview. Comment out listview updates
                        and see how long it takes. Generally, you want to batch updates like this
                        because feeding one line at a time is slow. You can batch updates with
                        AddRange().

                        Comment

                        • ShaneO

                          #13
                          Re: Is .NET slower than - say - VB6?

                          Michel Posseth [MCP] wrote:
                          >
                          I altered the prog with the knowledge i posessed at that time about the
                          framework and the VB.Net prog blew the VB6 prog to the moon in terms of
                          speed
                          .Net was superior in speed now .
                          >
                          VB6 ISNOT VB.Net you should really buy yourself a good reference i would
                          recomend the Balena book "Programmin g Microsoft Visual Basic" and allow
                          yourself some studying and play time .
                          >
                          Michel is 100% correct here.

                          I only switched-over to VB2005 from VB6 a couple of years ago and I
                          distinctly recall all the speed issues I was having at that time. There
                          were many times that I thought I'd simply give-up, but then I'd push
                          myself to continue to struggle with .NET.

                          Now I wouldn't have it any other way! Sure, there are still a couple of
                          minor issues with the speed of the UI, but now that I've educated myself
                          in using the correct commands and tools exposed by .NET, I am entirely
                          satisfied with the speed. I would even go as far as to say that I can
                          now obtain higher overall performance from my .NET apps than I could
                          ever have expected from VB6.

                          Just stick with it, read as much as you can, and ask as many questions
                          on specific issues as you need. Concentrate on fixing individual
                          routines that are creating bottlenecks, one at a time, and you'll
                          progressively learn the new/better/right way to do it.

                          You will eventually be glad of the change.


                          ShaneO

                          There are 10 kinds of people - Those who understand Binary and those who
                          don't.

                          Comment

                          • news.microsoft.com

                            #14
                            Re: Is .NET slower than - say - VB6? - code examples

                            Mmmm... both excellent! Give me a while - I'm off to bed now - I'll check it
                            out tomorrow!

                            Mark


                            Comment

                            • Dick Grier

                              #15
                              Re: Is .NET slower than - say - VB6?

                              There are things that ARE slower when executing in .NET vs VB6. BTW, a
                              ListBox is very slow to update -- even in VB6, and it is worse in .NET.

                              --
                              Richard Grier, MVP
                              Hard & Software
                              Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
                              Edition,
                              ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
                              2006.
                              See www.hardandsoftware.net for details and contact information.


                              Comment

                              Working...