Click or drag to resize

Performance Tips

For smooth functioning and improved performance we recommend the following:

  • All Media items like Pen, Brush, etc must be frozen. This is not only to improve rendering performance but also to avoid any exceptions which may arise due to cross-thread references of any unfrozen media object, ArthaChitra being a multi-threaded application. The setters of any base media property by default freezees the object. If the user defines any custom media property he/she must ensure that it is frozen.
  • We recommend using GlyphRun to draw any text based geometry. ArthaChitra has DrawText extention method to draw efficient text on the fly. Please make sure to add the ArthaChitra.Model.Common namespace in the using directive so that the methods are invoked.
    C#
    using ArthaChitra.Model.Common;
    
    protected override void OnRender(DrawingContext dc, ChartVisualArgs args)
    {
        dc.DrawText("Hello world", new Point(50,50));
  • FormattedText is resource heavy and we recommed avoiding it.
  • Please click here for more performance related tips and tricks.
  • Performation rules