SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

From time to time at SciChart HQ, we get asked for even more performance. Yes! I know it’s crazy, SciChart can easily handle 10 million points in real-time (or even up to 100 Million points at 2-4 FPS) in a line-chart, but sometimes we get asked ‘well, can you do more?’

So … wait … you want more than 10s of millions of points? … Ok then! .. 

So we had a go to try to optimize certain critical paths of SciChart’s WPF Chart. Right now, we’re already using unsafe code (pointer arithmetic in .NET) for our performance critical algorithms, plus DirectX for drawing, however there is the potential to move certain critical routines over to C++ with SSE (Streaming SIMD Extensions), which allow us to vectorize and hence accelerate certain numerical methods.

Simd-Performance-Wpf-Chart-Prototype

SciChart WPF Charts SIMD Prototype. 5x performance improvement for some chart types. More performance is possible if we do a whole program optimization.

Our prototype was pretty good! In just a few days, we managed to increase the overall performance of Resampling algorithms (used for lossless timeseries reduction) by 3-3.5x using C++/SSE*. That means a time-series chart which renders comfortably with 10M points at 30FPS can now render at the same framerate with 40M points. Or a chart that can render (albeit slowly) with 100M points can now handle 400M points.

But resampling doesn’t improve everything. In fact, from our own internal tests and extensive experience building High Performance Chart controls we know that Measuring and Improving Charting Performance is extremely complex and with many different pathways, we have to change many parts of the code to provide an optimum overall solution to deliver super High Performance WPF Charts.

For instance, we can move our rendering code to C++. Currently all our rendering is done in C# using interfaces and we transform points one at a time from data to pixel coordinates and vertices! The whole thing could be improved – a lot – if we moved some parts of the code over to C++ and started working in batches.

So, before we embark on this road of painstaking optimization, we’d like to know from you, our user base, how important is it to you? We have a simple Yes or No question “Should we optimize for even more performance?”.

* This optimization introduces a dependency on the Visual C++ Runtime, which must be installed on end-user PCs (pretty easy, but you should be aware of it).

Survey

Please find the survey below. If you’d like to comment, please do so at the footer of this article.

Create your own user feedback survey

2 Comments

  1. Marco Ragogna says:

    In our typical scenario performance is pretty good already. I instead would prefer to avoid introducing a dependency on the Visual C++ Runtime, because as software developer I don’t have a full control over our full IT infrastructure and ask to IT department to install runtime to every PC could be problematic.

    • Andrew says:

      Hi Marco,

      Thanks for commenting!

      I think we’ve figured out a way to do it without C++ runtime. I agree with you about keeping it simple, SciChart libraries should ‘just deploy!’ and not require any dependencies. This is also something we’re working towards: to drop SharpDX and D3DX9/10 dependencies for SciChart.DirectX, as well as drop Visual C++ Runtime dependency for SciChart3D.

      Best regards,
      Andrew

Leave a Reply