Performance issues using .NET C++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TGF

    #1

    Performance issues using .NET C++

    I am wondering if it is feasible to use .NET for applications that have to
    be very fast. We have a few applications that are blazingly fast, written
    in Borland C++ using Borland C++ Builder. We would like to port over to
    ..NET, but some of the test models we have developed are MUCH, MUCH slower
    than it's Borland counterpart. Is this due to the .NET Framework and the
    JIT? Or is it something we should be looking for in the project settings
    and/or compiler settings? The performance decrease is about two-fold.

    --
    TGF


  • Pent

    #2
    Re: Performance issues using .NET C++

    It is feasible. This can't be answered without looking at the bottlenecks
    that you are encountering.

    "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
    news:%23lmmaK6p DHA.2216@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > I am wondering if it is feasible to use .NET for applications that have to
    > be very fast. We have a few applications that are blazingly fast, written
    > in Borland C++ using Borland C++ Builder. We would like to port over to
    > .NET, but some of the test models we have developed are MUCH, MUCH slower
    > than it's Borland counterpart. Is this due to the .NET Framework and the
    > JIT? Or is it something we should be looking for in the project settings
    > and/or compiler settings? The performance decrease is about two-fold.
    >
    > --
    > TGF
    >
    >[/color]


    Comment

    • TGF

      #3
      Re: Performance issues using .NET C++

      Pent:

      It primarily occurs (I think) in the UI thread when I go to update a
      RichTextBox. I need to update this, line by line, very very quickly and
      very often. I am currently using it's AppendText() method. It seems to go
      very slow when it has to scroll after and AppendText() call. What is
      strange though is if I stop updating it and then using the scrollbar, I can
      scroll through the text at lightning speed. So I am not sure why any of
      this happens, but it is frustrating nonetheless. Got any ideas? I would
      even go with another visual component if I thought it would work better.

      -TGF



      "Pent" <pent> wrote in message news:eyzfBQAqDH A.1656@tk2msftn gp13.phx.gbl...[color=blue]
      > It is feasible. This can't be answered without looking at the bottlenecks
      > that you are encountering.
      >
      > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
      > news:%23lmmaK6p DHA.2216@TK2MSF TNGP12.phx.gbl. ..[color=green]
      > > I am wondering if it is feasible to use .NET for applications that have[/color][/color]
      to[color=blue][color=green]
      > > be very fast. We have a few applications that are blazingly fast,[/color][/color]
      written[color=blue][color=green]
      > > in Borland C++ using Borland C++ Builder. We would like to port over to
      > > .NET, but some of the test models we have developed are MUCH, MUCH[/color][/color]
      slower[color=blue][color=green]
      > > than it's Borland counterpart. Is this due to the .NET Framework and[/color][/color]
      the[color=blue][color=green]
      > > JIT? Or is it something we should be looking for in the project[/color][/color]
      settings[color=blue][color=green]
      > > and/or compiler settings? The performance decrease is about two-fold.
      > >
      > > --
      > > TGF
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Pent

        #4
        Re: Performance issues using .NET C++

        Your problem is somewhere else. I created simple winform app, added timer to
        fire every 20ms. Placed RichTextBox and called it's AppendText with 200 char
        strings from timer callback. No slow down whatsoever.

        "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
        news:O5SAh6FqDH A.1884@TK2MSFTN GP09.phx.gbl...[color=blue]
        > Pent:
        >
        > It primarily occurs (I think) in the UI thread when I go to update a
        > RichTextBox. I need to update this, line by line, very very quickly and
        > very often. I am currently using it's AppendText() method. It seems to[/color]
        go[color=blue]
        > very slow when it has to scroll after and AppendText() call. What is
        > strange though is if I stop updating it and then using the scrollbar, I[/color]
        can[color=blue]
        > scroll through the text at lightning speed. So I am not sure why any of
        > this happens, but it is frustrating nonetheless. Got any ideas? I would
        > even go with another visual component if I thought it would work better.
        >
        > -TGF
        >
        >
        >
        > "Pent" <pent> wrote in message[/color]
        news:eyzfBQAqDH A.1656@tk2msftn gp13.phx.gbl...[color=blue][color=green]
        > > It is feasible. This can't be answered without looking at the[/color][/color]
        bottlenecks[color=blue][color=green]
        > > that you are encountering.
        > >
        > > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
        > > news:%23lmmaK6p DHA.2216@TK2MSF TNGP12.phx.gbl. ..[color=darkred]
        > > > I am wondering if it is feasible to use .NET for applications that[/color][/color][/color]
        have[color=blue]
        > to[color=green][color=darkred]
        > > > be very fast. We have a few applications that are blazingly fast,[/color][/color]
        > written[color=green][color=darkred]
        > > > in Borland C++ using Borland C++ Builder. We would like to port over[/color][/color][/color]
        to[color=blue][color=green][color=darkred]
        > > > .NET, but some of the test models we have developed are MUCH, MUCH[/color][/color]
        > slower[color=green][color=darkred]
        > > > than it's Borland counterpart. Is this due to the .NET Framework and[/color][/color]
        > the[color=green][color=darkred]
        > > > JIT? Or is it something we should be looking for in the project[/color][/color]
        > settings[color=green][color=darkred]
        > > > and/or compiler settings? The performance decrease is about two-fold.
        > > >
        > > > --
        > > > TGF
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • TGF

          #5
          Re: Performance issues using .NET C++

          Pent,

          I did the same thing, but with a 1ms timer (fastest it can go), and it
          is not able to keep up with my Borland C++ Builder version. We are talking
          about 2 to 5 fold slower....but this only happens when I make the TextBox
          large (about 60 lines of text displayed at once). The slow down is the
          RichTextBox. It just is not very fast. Are you getting similar results?

          -TGF



          -TGF
          "Pent" <pent> wrote in message news:OguSKqHqDH A.3732@tk2msftn gp13.phx.gbl...[color=blue]
          > Your problem is somewhere else. I created simple winform app, added timer[/color]
          to[color=blue]
          > fire every 20ms. Placed RichTextBox and called it's AppendText with 200[/color]
          char[color=blue]
          > strings from timer callback. No slow down whatsoever.
          >
          > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
          > news:O5SAh6FqDH A.1884@TK2MSFTN GP09.phx.gbl...[color=green]
          > > Pent:
          > >
          > > It primarily occurs (I think) in the UI thread when I go to update a
          > > RichTextBox. I need to update this, line by line, very very quickly and
          > > very often. I am currently using it's AppendText() method. It seems to[/color]
          > go[color=green]
          > > very slow when it has to scroll after and AppendText() call. What is
          > > strange though is if I stop updating it and then using the scrollbar, I[/color]
          > can[color=green]
          > > scroll through the text at lightning speed. So I am not sure why any of
          > > this happens, but it is frustrating nonetheless. Got any ideas? I[/color][/color]
          would[color=blue][color=green]
          > > even go with another visual component if I thought it would work better.
          > >
          > > -TGF
          > >
          > >
          > >
          > > "Pent" <pent> wrote in message[/color]
          > news:eyzfBQAqDH A.1656@tk2msftn gp13.phx.gbl...[color=green][color=darkred]
          > > > It is feasible. This can't be answered without looking at the[/color][/color]
          > bottlenecks[color=green][color=darkred]
          > > > that you are encountering.
          > > >
          > > > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
          > > > news:%23lmmaK6p DHA.2216@TK2MSF TNGP12.phx.gbl. ..
          > > > > I am wondering if it is feasible to use .NET for applications that[/color][/color]
          > have[color=green]
          > > to[color=darkred]
          > > > > be very fast. We have a few applications that are blazingly fast,[/color]
          > > written[color=darkred]
          > > > > in Borland C++ using Borland C++ Builder. We would like to port[/color][/color][/color]
          over[color=blue]
          > to[color=green][color=darkred]
          > > > > .NET, but some of the test models we have developed are MUCH, MUCH[/color]
          > > slower[color=darkred]
          > > > > than it's Borland counterpart. Is this due to the .NET Framework[/color][/color][/color]
          and[color=blue][color=green]
          > > the[color=darkred]
          > > > > JIT? Or is it something we should be looking for in the project[/color]
          > > settings[color=darkred]
          > > > > and/or compiler settings? The performance decrease is about[/color][/color][/color]
          two-fold.[color=blue][color=green][color=darkred]
          > > > >
          > > > > --
          > > > > TGF
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Pent

            #6
            Re: Performance issues using .NET C++

            nope, i don't see that

            "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
            news:OMpM9UIqDH A.2404@TK2MSFTN GP12.phx.gbl...[color=blue]
            > Pent,
            >
            > I did the same thing, but with a 1ms timer (fastest it can go), and it
            > is not able to keep up with my Borland C++ Builder version. We are[/color]
            talking[color=blue]
            > about 2 to 5 fold slower....but this only happens when I make the TextBox
            > large (about 60 lines of text displayed at once). The slow down is the
            > RichTextBox. It just is not very fast. Are you getting similar results?
            >
            > -TGF
            >
            >
            >
            > -TGF
            > "Pent" <pent> wrote in message[/color]
            news:OguSKqHqDH A.3732@tk2msftn gp13.phx.gbl...[color=blue][color=green]
            > > Your problem is somewhere else. I created simple winform app, added[/color][/color]
            timer[color=blue]
            > to[color=green]
            > > fire every 20ms. Placed RichTextBox and called it's AppendText with 200[/color]
            > char[color=green]
            > > strings from timer callback. No slow down whatsoever.
            > >
            > > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
            > > news:O5SAh6FqDH A.1884@TK2MSFTN GP09.phx.gbl...[color=darkred]
            > > > Pent:
            > > >
            > > > It primarily occurs (I think) in the UI thread when I go to update a
            > > > RichTextBox. I need to update this, line by line, very very quickly[/color][/color][/color]
            and[color=blue][color=green][color=darkred]
            > > > very often. I am currently using it's AppendText() method. It seems[/color][/color][/color]
            to[color=blue][color=green]
            > > go[color=darkred]
            > > > very slow when it has to scroll after and AppendText() call. What is
            > > > strange though is if I stop updating it and then using the scrollbar,[/color][/color][/color]
            I[color=blue][color=green]
            > > can[color=darkred]
            > > > scroll through the text at lightning speed. So I am not sure why any[/color][/color][/color]
            of[color=blue][color=green][color=darkred]
            > > > this happens, but it is frustrating nonetheless. Got any ideas? I[/color][/color]
            > would[color=green][color=darkred]
            > > > even go with another visual component if I thought it would work[/color][/color][/color]
            better.[color=blue][color=green][color=darkred]
            > > >
            > > > -TGF
            > > >
            > > >
            > > >
            > > > "Pent" <pent> wrote in message[/color]
            > > news:eyzfBQAqDH A.1656@tk2msftn gp13.phx.gbl...[color=darkred]
            > > > > It is feasible. This can't be answered without looking at the[/color]
            > > bottlenecks[color=darkred]
            > > > > that you are encountering.
            > > > >
            > > > > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
            > > > > news:%23lmmaK6p DHA.2216@TK2MSF TNGP12.phx.gbl. ..
            > > > > > I am wondering if it is feasible to use .NET for applications that[/color]
            > > have[color=darkred]
            > > > to
            > > > > > be very fast. We have a few applications that are blazingly fast,
            > > > written
            > > > > > in Borland C++ using Borland C++ Builder. We would like to port[/color][/color]
            > over[color=green]
            > > to[color=darkred]
            > > > > > .NET, but some of the test models we have developed are MUCH, MUCH
            > > > slower
            > > > > > than it's Borland counterpart. Is this due to the .NET Framework[/color][/color]
            > and[color=green][color=darkred]
            > > > the
            > > > > > JIT? Or is it something we should be looking for in the project
            > > > settings
            > > > > > and/or compiler settings? The performance decrease is about[/color][/color]
            > two-fold.[color=green][color=darkred]
            > > > > >
            > > > > > --
            > > > > > TGF
            > > > > >
            > > > > >
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • TGF

              #7
              Re: Performance issues using .NET C++

              Could you send me your project and I will test it out on my machine?

              -TGF


              "Pent" <pent> wrote in message news:O6t5oDJqDH A.2808@TK2MSFTN GP10.phx.gbl...[color=blue]
              > nope, i don't see that
              >
              > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
              > news:OMpM9UIqDH A.2404@TK2MSFTN GP12.phx.gbl...[color=green]
              > > Pent,
              > >
              > > I did the same thing, but with a 1ms timer (fastest it can go), and[/color][/color]
              it[color=blue][color=green]
              > > is not able to keep up with my Borland C++ Builder version. We are[/color]
              > talking[color=green]
              > > about 2 to 5 fold slower....but this only happens when I make the[/color][/color]
              TextBox[color=blue][color=green]
              > > large (about 60 lines of text displayed at once). The slow down is the
              > > RichTextBox. It just is not very fast. Are you getting similar results?
              > >
              > > -TGF
              > >
              > >
              > >
              > > -TGF
              > > "Pent" <pent> wrote in message[/color]
              > news:OguSKqHqDH A.3732@tk2msftn gp13.phx.gbl...[color=green][color=darkred]
              > > > Your problem is somewhere else. I created simple winform app, added[/color][/color]
              > timer[color=green]
              > > to[color=darkred]
              > > > fire every 20ms. Placed RichTextBox and called it's AppendText with[/color][/color][/color]
              200[color=blue][color=green]
              > > char[color=darkred]
              > > > strings from timer callback. No slow down whatsoever.
              > > >
              > > > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
              > > > news:O5SAh6FqDH A.1884@TK2MSFTN GP09.phx.gbl...
              > > > > Pent:
              > > > >
              > > > > It primarily occurs (I think) in the UI thread when I go to update a
              > > > > RichTextBox. I need to update this, line by line, very very quickly[/color][/color]
              > and[color=green][color=darkred]
              > > > > very often. I am currently using it's AppendText() method. It[/color][/color][/color]
              seems[color=blue]
              > to[color=green][color=darkred]
              > > > go
              > > > > very slow when it has to scroll after and AppendText() call. What[/color][/color][/color]
              is[color=blue][color=green][color=darkred]
              > > > > strange though is if I stop updating it and then using the[/color][/color][/color]
              scrollbar,[color=blue]
              > I[color=green][color=darkred]
              > > > can
              > > > > scroll through the text at lightning speed. So I am not sure why[/color][/color][/color]
              any[color=blue]
              > of[color=green][color=darkred]
              > > > > this happens, but it is frustrating nonetheless. Got any ideas? I[/color]
              > > would[color=darkred]
              > > > > even go with another visual component if I thought it would work[/color][/color]
              > better.[color=green][color=darkred]
              > > > >
              > > > > -TGF
              > > > >
              > > > >
              > > > >
              > > > > "Pent" <pent> wrote in message
              > > > news:eyzfBQAqDH A.1656@tk2msftn gp13.phx.gbl...
              > > > > > It is feasible. This can't be answered without looking at the
              > > > bottlenecks
              > > > > > that you are encountering.
              > > > > >
              > > > > > "TGF" <tfitz@engr.uco nn.edu[remove brackets]> wrote in message
              > > > > > news:%23lmmaK6p DHA.2216@TK2MSF TNGP12.phx.gbl. ..
              > > > > > > I am wondering if it is feasible to use .NET for applications[/color][/color][/color]
              that[color=blue][color=green][color=darkred]
              > > > have
              > > > > to
              > > > > > > be very fast. We have a few applications that are blazingly[/color][/color][/color]
              fast,[color=blue][color=green][color=darkred]
              > > > > written
              > > > > > > in Borland C++ using Borland C++ Builder. We would like to port[/color]
              > > over[color=darkred]
              > > > to
              > > > > > > .NET, but some of the test models we have developed are MUCH,[/color][/color][/color]
              MUCH[color=blue][color=green][color=darkred]
              > > > > slower
              > > > > > > than it's Borland counterpart. Is this due to the .NET[/color][/color][/color]
              Framework[color=blue][color=green]
              > > and[color=darkred]
              > > > > the
              > > > > > > JIT? Or is it something we should be looking for in the project
              > > > > settings
              > > > > > > and/or compiler settings? The performance decrease is about[/color]
              > > two-fold.[color=darkred]
              > > > > > >
              > > > > > > --
              > > > > > > TGF
              > > > > > >
              > > > > > >
              > > > > >
              > > > > >
              > > > >
              > > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...