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.
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).
Please find the survey below. If you’d like to comment, please do so at the footer of this article.