Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Grid performance - appearance initialization
posted

We are initializing the appearance for an editor control that we are using like this:

    internal class HiddenLinkFormattedTextEditor : UltraFormattedTextEditor
    {
        internal HiddenLinkFormattedTextEditor()
        {
            var foreColor = Color.FromArgb(0xFF, 0x38, 0x43, 0x50); // DarkNavy

            this.ActiveLinkAppearance.ForeColor = foreColor;
            this.ActiveLinkAppearance.Cursor = Cursors.Arrow;

            this.LinkAppearance.ForeColor = foreColor;
            this.LinkAppearance.Cursor = Cursors.Arrow;

            this.HotTrackLinkAppearance.ForeColor = foreColor;
            this.HotTrackLinkAppearance.Cursor = Cursors.Arrow;

            this.VisitedLinkAppearance.ForeColor = foreColor;
            this.VisitedLinkAppearance.Cursor = Cursors.Arrow;

            this.VisitedLinksManager = null;

            this.UnderlineLinks = UnderlineLink.Never;
        }

In the performance profiler I see that the appearance calls are translated to 4 calls to Infragistics.Win.Appearance.set_ForeColor (obviously a static property) which takes about 1 second during startup of our application (probably because there are already a couple of instantiated and bound grids where this property then gets re-applied).

Is there a better way to do this? Since these are static properties - do I need to introduce my own marker variable that I set when I have gone through this initialization once (even if it looks like it is setting instance properties)?

Any other suggestions for optimizing performance for this initialization?

Please note: this particular method seems to have gotten slower compared to the pretty ancient version (IG 2011) that we have been using until recently.

Parents
  • 7555
    Offline posted

    Hello Uwe, 

    Thank you for contacting. Looking into the winform document here is a general Grid performance guide if you wants to have a look ,

    https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/15306/wingrid-performance-guide

     

    In terms of appearance performance we don’t have any document to give us this particular information.

    May be try using app appstylist for the style and see if it give you better performance.

    Also may i know how you are checking the performance? Can you share the sample to compare the behavior with Version 2011,

    Its possible that since 2011 we have made lots of changes cause this behavior that i would need to test with your sample.

    Regards,

     

     

Reply Children