Pre loader

High performance caching of brushes / sprites / textures

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hello,

I am creating a very demanding application with several vertically stacked charts. I would like to use the best approach for using brushes / pens / sprites and textures.

  1. Can I leave the resources between render passes or do I have to always dispose it after a render pass?
  2. Which method is the most performant when drawing images? Should I use ISprite2d or ITexture2d. Is the DrawSprites the most performant?
Version
8.3.0.28019
  • Lex
    Hello Blazej, Thanks for your questions. We are to discuss them and will get back to you as soon as we have an update. Kind regards, Les, SciChart Technical Support Engineer
  • You must to post comments
0
0

Hello Blazej,

We discussed your inquiry.
1. It is fine to cache resources like IPen2D, IBrush2D, ISprite2D so they can be reused in multiple render passes. Just make sure they are disposed eventually.

  1. It depends on multiple conditions. In general, you should use Sprites if you want to create an object once and cache it, then draw it multiple times (like XyScatterRenderableSeries in SciChart).
    Here is a corresponding article:
    SciChart WPF Documentation – The Scatter Series Type | WPF Chart Documentation

On the other hand, if you have an object that changes frequently, it is better to create an ITexture2D, then update it regularly and render.

Also, please keep in mind that creationing of any resources is very time-consuming, so you want to minimize creation to achieve the best performance.

Kind regards,
Lex,
SciChart Technical Support Engineer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.