Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. WPF Performance

WPF Performance

Scheduled Pinned Locked Moved The Lounge
csharpcsswpfwinformsdesign
64 Posts 27 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    realJSOP
    wrote on last edited by
    #1

    I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

    H N C Q L 13 Replies Last reply
    0
    • R realJSOP

      I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

      H Offline
      H Offline
      hairy_hats
      wrote on last edited by
      #2

      John Simmons / outlaw programmer wrote:

      markedly less performant

      Is that anything like "slower"[^]?

      R 1 Reply Last reply
      0
      • H hairy_hats

        John Simmons / outlaw programmer wrote:

        markedly less performant

        Is that anything like "slower"[^]?

        R Offline
        R Offline
        realJSOP
        wrote on last edited by
        #3

        You can always find the answer you want on the internet. http://en.wiktionary.org/wiki/performant[^]

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

        C H 2 Replies Last reply
        0
        • R realJSOP

          I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Are you using data-binding? If you are, then it should be faster than equivalent WinForms most of the time. If you are manually adding items to container controls (like list/combo controls), then it may be a tad slower.

          Regards, Nish


          My technology blog: voidnish.wordpress.com

          R R 2 Replies Last reply
          0
          • R realJSOP

            You can always find the answer you want on the internet. http://en.wiktionary.org/wiki/performant[^]

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

            C Offline
            C Offline
            CPallini
            wrote on last edited by
            #5

            Or you may write yourself the entry. :-D

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            1 Reply Last reply
            0
            • R realJSOP

              I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              Here[^] (I hope) some insight: see the notes below the question.

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              R 1 Reply Last reply
              0
              • R realJSOP

                I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                -----
                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                -----
                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                Q Offline
                Q Offline
                QuiJohn
                wrote on last edited by
                #7

                Is there one area that it's slowest in? Drawing graphs, calculating stuff, etc.? (I don't use reputationator so I don't know what it spends most of its time doing.) I'm just curious, because I would have thought performance was a reason to switch to WPF. At least for UI performance, I thought that was kinda the point. I started down the WPF path several months ago, but got sidetracked by a million different things at work. I'm not sure if I'm going to go back to WPF or abandon it completely and stick with C++. I'll cross that bridge when I burn it.

                R 1 Reply Last reply
                0
                • R realJSOP

                  I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                  -----
                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                  -----
                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  New technology in development is for beauty and presentation not performance. If you want speed go back to c/c++ and winforms.

                  I only read newbie introductory dummy books.

                  1 Reply Last reply
                  0
                  • R realJSOP

                    I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                    -----
                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                    -----
                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                    R Offline
                    R Offline
                    Rama Krishna Vavilala
                    wrote on last edited by
                    #9

                    John Simmons / outlaw programmer wrote:

                    I have to admit that I was somewhat shocked.

                    I am shocked that you were shocked. The biggest suckage of WPF is the poor performance and I can't believe that in all your WPF sucks posts you missed that.

                    1 Reply Last reply
                    0
                    • R realJSOP

                      I'm finishing up on a WPF version of Reputationator, and have observed that the WPF app UI is markedly less performant than the WinForms version. Has anyone else done something similar (create a winforms and wpf version of the same app), and then observed similar results? I have to admit that I was somewhat shocked.

                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                      -----
                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                      -----
                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      No, not at all. We have converted a rather large application from WinForms to WPF and were quite satisfied. No flickering or other artifacts while updating the views and the logic behind them was the same. What exactly is not performing so well?

                      "Dark the dark side is. Very dark..." - Yoda ---
                      "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi

                      R R 2 Replies Last reply
                      0
                      • N Nish Nishant

                        Are you using data-binding? If you are, then it should be faster than equivalent WinForms most of the time. If you are manually adding items to container controls (like list/combo controls), then it may be a tad slower.

                        Regards, Nish


                        My technology blog: voidnish.wordpress.com

                        R Offline
                        R Offline
                        Rama Krishna Vavilala
                        wrote on last edited by
                        #11

                        Nishant Sivakumar wrote:

                        ? If you are, then it should be faster than equivalent WinForms most of the time.

                        Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).

                        N 1 Reply Last reply
                        0
                        • R realJSOP

                          You can always find the answer you want on the internet. http://en.wiktionary.org/wiki/performant[^]

                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                          -----
                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                          -----
                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                          H Offline
                          H Offline
                          hairy_hats
                          wrote on last edited by
                          #12

                          That entry appeared after the blog post saying that it wasn't a real word.

                          R 1 Reply Last reply
                          0
                          • N Nish Nishant

                            Are you using data-binding? If you are, then it should be faster than equivalent WinForms most of the time. If you are manually adding items to container controls (like list/combo controls), then it may be a tad slower.

                            Regards, Nish


                            My technology blog: voidnish.wordpress.com

                            R Offline
                            R Offline
                            realJSOP
                            wrote on last edited by
                            #13

                            Yes - everything involving collections is being databound. However, When I was working on a WPF project back in 2009, using binding or not using binding provided no difefrence in the UI performance (and if anything, NOT using databinding should be faster since you're probably not using reflection when performing the task manually.

                            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                            -----
                            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                            -----
                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                            N 1 Reply Last reply
                            0
                            • R Rama Krishna Vavilala

                              Nishant Sivakumar wrote:

                              ? If you are, then it should be faster than equivalent WinForms most of the time.

                              Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).

                              N Offline
                              N Offline
                              Nish Nishant
                              wrote on last edited by
                              #14

                              Rama Krishna Vavilala wrote:

                              Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).

                              My point is that within WPF data-binding works faster than when you manually add remove items, specially if you don't do the manual manipulation in the most optimized fashion. I was wodnering if perhaps John was doing that. And once both the WinForms app and equivalent WPF app use data-binding, my experience is the WPF app's faster. Except in certain situation where WPF has known performance issues.

                              Regards, Nish


                              My technology blog: voidnish.wordpress.com

                              R 1 Reply Last reply
                              0
                              • Q QuiJohn

                                Is there one area that it's slowest in? Drawing graphs, calculating stuff, etc.? (I don't use reputationator so I don't know what it spends most of its time doing.) I'm just curious, because I would have thought performance was a reason to switch to WPF. At least for UI performance, I thought that was kinda the point. I started down the WPF path several months ago, but got sidetracked by a million different things at work. I'm not sure if I'm going to go back to WPF or abandon it completely and stick with C++. I'll cross that bridge when I burn it.

                                R Offline
                                R Offline
                                realJSOP
                                wrote on last edited by
                                #15

                                David Kentley wrote:

                                I'm just curious, because I would have thought performance was a reason to switch to WPF. At least for UI performance, I thought that was kinda the point.

                                New Microsoft developer technologies have never been about performance, silly rabbit. :) The current dataset is comprised of about 500 items (it grows by 3-8 items every day, depending on the reputation status of the user). It should be at least as snappy as the winforms app (which uses the same calculation code).

                                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                -----
                                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                -----
                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                1 Reply Last reply
                                0
                                • N Nish Nishant

                                  Rama Krishna Vavilala wrote:

                                  Are you sure? I have not seen data binding improve performance. What basis do you say that. If at all I expect data-binding to degrade the performance a little bit (Reflection + late binding).

                                  My point is that within WPF data-binding works faster than when you manually add remove items, specially if you don't do the manual manipulation in the most optimized fashion. I was wodnering if perhaps John was doing that. And once both the WinForms app and equivalent WPF app use data-binding, my experience is the WPF app's faster. Except in certain situation where WPF has known performance issues.

                                  Regards, Nish


                                  My technology blog: voidnish.wordpress.com

                                  R Offline
                                  R Offline
                                  Rama Krishna Vavilala
                                  wrote on last edited by
                                  #16

                                  Nishant Sivakumar wrote:

                                  WPF data-binding works faster than when you manually add remove items,

                                  That is what I am surprised at. How can reflection and binding can actually lead to better performance then directly adding items? Something is not adding up here. WPF performance issues are mostly due to rendering, so I am more surprised that data-binding or not will improve the performance. Win32 (hence Winforms) rendering is actually faster. Do you know what WPF is doing to optimize the data binding which causes improvement in performance? I doubt they can bypass reflection.

                                  N 1 Reply Last reply
                                  0
                                  • L Lost User

                                    No, not at all. We have converted a rather large application from WinForms to WPF and were quite satisfied. No flickering or other artifacts while updating the views and the logic behind them was the same. What exactly is not performing so well?

                                    "Dark the dark side is. Very dark..." - Yoda ---
                                    "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi

                                    R Offline
                                    R Offline
                                    realJSOP
                                    wrote on last edited by
                                    #17

                                    Initial display of the chart, or clicking a checkbox to show/hide a series takes almost a second (maybe a little more) to update the chart, regardless of the number of data points being displayed. The WinForms app exhibits an instantaneous change.

                                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                    -----
                                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                    -----
                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                    L 1 Reply Last reply
                                    0
                                    • C CPallini

                                      Here[^] (I hope) some insight: see the notes below the question.

                                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                      [My articles]

                                      R Offline
                                      R Offline
                                      realJSOP
                                      wrote on last edited by
                                      #18

                                      That's got some pretty funny comments, the most humorous of which is the casual use of the word "trivial" when talking about WPF. Yeah - it's trivial if you don't need to color outside the lines. Reputationator has some requirements that prevent the use of Xaml in some instances. In both the winforms app and the WPF app, I build the chart objects in the CS files, mostly because it's easier to do it that way, but there are other reasons. BTW, I have a DX10-compatible video card (nVidia 8800GTX), so I don't think that's the problem.

                                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                      -----
                                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                      -----
                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                      _ 1 Reply Last reply
                                      0
                                      • H hairy_hats

                                        That entry appeared after the blog post saying that it wasn't a real word.

                                        R Offline
                                        R Offline
                                        realJSOP
                                        wrote on last edited by
                                        #19

                                        Do you believe all the blog posts you read? If so, I've seen a few from people that talk about the reptillian aliens that are controlling our planet from secret underground lairs. :)

                                        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                        -----
                                        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                        -----
                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                        H B 2 Replies Last reply
                                        0
                                        • R realJSOP

                                          Initial display of the chart, or clicking a checkbox to show/hide a series takes almost a second (maybe a little more) to update the chart, regardless of the number of data points being displayed. The WinForms app exhibits an instantaneous change.

                                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                          -----
                                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                          -----
                                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #20

                                          That is strange. Our program was a webservice client and the WinForms version was based on an expanded MVP pattern. We ported the little MVP framework to WPF, so that we could continue to use the logic of the WinForms version and only had to redo the views themelves. Naturally, the data access over the webservice did not get any faster or slower, but we have had no noticable further delay. The views are WPF user controls and data is usually supplied by the presenter, so little to no data binding is used. Perhaps this is what slows you down. Edit: Fixed some typos

                                          "Dark the dark side is. Very dark..." - Yoda ---
                                          "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi

                                          modified on Thursday, August 25, 2011 9:05 AM

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups