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.
Unfortunately, activation email could not send to your email. Please try again.

Suggested Performance Improvement

Thread ID:





79436 Feb 9,2009 07:46 PM Apr 15,2009 07:18 AM Windows Forms 2
Tags: Diagram
Eric Robishaw
Asked On February 9, 2009 07:46 PM

If a line style.width = 0, you should not draw the border.

So for every DrawBorder method, do:
if (LineStyle.BorderWidth >0)


Same for the Node's DrawInterior() method regarding FillStyles:

if (FillStyle.Type == Solid && (FillStyle.BackColor == Color.Transparent || FillStyle.BackColor == Color.None))
//do not DrawInterior

Otherwise, for empty backgrounds you're creating a brush and doing a FillPath for NO reason.

**** IDEALLY *****
You should really add a "Visible" attribute to both FillStyle and LineStyle classes. Then, check first if Visible before doint DrawBorder or DrawInterior actions.
In many cases, this simple, very easy to implement change would produce significant performance improvements.

ALSO: you need to make DrawShading a protected method. Otherwise, if I create a derived class of say Ellipse Node, and want to implement my own Render method, or my own DrawInterior method, I have to implement my own shading, b/c your DrawShading method is private!


Ajeet M [Syncfusion]
Replied On February 11, 2009 08:01 AM

Hi Eric,

Thanks for this important update. I have logged this as a defect report and we shall start to work on this shortly.

Let me know if you shall need any further clarifications in this regard.

Warm Regards,

Administrator [Syncfusion]
Replied On April 15, 2009 07:18 AM

Hi Eric,

The defect has been fixed in our latest codebase, and if you would like to receive a solution, then please contact Syncfusion Support (email: support@syncfusion.com) as we cannot provide defect fixes in a public forum.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.