We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

TraderGrid performance in 3.2.0.1 v.s 3.3.0.0

The TraderGrid sample in 3.2.0.1 seems to perform much better than the one in 3.3.0.0. The 3.3 TraderGrid sample keeps my CPU at 45% even after I turn off row insert/remove. The 3.2.0.1 TraderGrid sample keeps my CPU below 2%. Also, there are no painting issues in 3.2.0.1 that I could see in the 3.3

4 Replies

AD Administrator Syncfusion Team November 9, 2005 04:42 PM UTC

Are you running both versions in the same height/width grid? Also, there may be some console output in 3.3 that was not in 3.2, so try running both versions in release mode. The drawing problem you mentioned in 3.3 I think is associated with resizing the form and not recreating the cached graphics object.


MI Mike November 9, 2005 05:40 PM UTC

I was questioning that unconditional re-use of the Graphics myself. The Size handler soes solve the problem. 1. According to the MSDN documentation the Graphics context is valid within a single window message only. As for the grid control, can you clarify this? 2. Can I use the similar DrawClippedGrid approach in 2.1.0.9? THANKS!


AD Administrator Syncfusion Team November 10, 2005 08:13 AM UTC

Mike, I think MSDN documentation is referring here to the Grpahics context that is supplied to you by a OnPaint routine. That is only valid for short time. If you manually create a Graphics context with CreateGraphics that will stay valid until you dispose it. I remember there were several other code changes after 2.1.0.9 to make DrawClippedGrid work. So with 2.1.0.9 that might become difficult. If you notice performance differences between 3.2.1 and 3.3 try setting these properties before you call DrawText: e.Style.WrapText = false; e.Style.Trimming = StringTrimming.None; This ensures that the most performant code withi the DrawText routine is executed. Stefan >I was questioning that unconditional re-use of the Graphics myself. > >The Size handler soes solve the problem. > >1. According to the MSDN documentation the Graphics context is valid within a single window message only. As for the grid control, can you clarify this? > >2. Can I use the similar DrawClippedGrid approach in 2.1.0.9? > >THANKS! >


MI Mike November 10, 2005 04:25 PM UTC

Stefan, The CPU% difference is there when I run the TraderGrid samples in 3.2 and 3.3. In my code I''m already using these settings you recommended (wrap and trimming). Could you please try to create a sample your mentioned in http://www.syncfusion.com/Support/forums/message.aspx?MessageID=36652? Thanks >Mike, > >I think MSDN documentation is referring here to the Grpahics context that is supplied to you by a OnPaint routine. That is only valid for short time. > >If you manually create a Graphics context with CreateGraphics that will stay valid until you dispose it. > >I remember there were several other code changes after 2.1.0.9 to make DrawClippedGrid work. So with 2.1.0.9 that might become difficult. > >If you notice performance differences between 3.2.1 and 3.3 try setting these properties before you call DrawText: > >e.Style.WrapText = false; >e.Style.Trimming = StringTrimming.None; > >This ensures that the most performant code withi the DrawText routine is executed. > >Stefan > >>I was questioning that unconditional re-use of the Graphics myself. > > > >> >>The Size handler soes solve the problem. >> >>1. According to the MSDN documentation the Graphics context is valid within a single window message only. As for the grid control, can you clarify this? >> >>2. Can I use the similar DrawClippedGrid approach in 2.1.0.9? >> >>THANKS! >>

Loader.
Live Chat Icon For mobile
Up arrow icon