I’m evaluating SciChart v6.1 for a WPF realtime charting application.
So far everything has worked well, except some issues with very slow loading.
On my machine, any app referencing SciChart takes around 5-6 seconds to initialize before the app can continue loading.
Some debugging with dotTrace shows most of the time is spent in the constructor of SciChartSurface calling the Charting2DNativeDllsLoader constructor.
dev machine is Windows 10 Pro x64, core i7, 32GB ram
Visual Studio 2019 Pro
To duplicate create new WPF application, .NET Framework v4.8
In MainWindow constructor add two lines:
SciChartSurface.SetRuntimeLicenseKey("[TRIAL KEY]"); var tmp = new SciChartSurface();
Executing the second line takes around 5-6 seconds.
I have uploaded a sample project that duplicates this issue and dotTrace result.
Let me know if I can provide any other info.
Update: Please see this video below showing vastly improved startup times
SciChart WPF v6.2 will be up to 28x faster or 0.15 seconds to initialize the first chart on our test machines. See the video below.
This will be released shortly, or you can get it now from our nightly build feed.
Thank you for your question, it’s great that you’ve asked it as people who search for this same problem will find the solution, so thanks!
We’ve literally just released an update in SciChart WPF v6.1 which addresses the slow initial one-time loading of SciChartSurface. This can be found here:
SciChart WPF v220.127.116.1175 Released! Preloading SciChart native
libraries and async load licensing before a SciChartSurface is shown
Some customers have reported slow initial startup time with SciChart
and asked for a way to do this initialization earlier in the
application, e.g. when a splash-screen is shown.
We’ve published a sample on Github showing how to do async library
loading with SciChart WPF v6.1 using two two static methods.
If you download the sample on our Github repository you can check out how to asynchronously load the licensing & native libraries in SciChart. We suggest doing this once in a splash screen or during initial startup of your application.
Let me know if this helps. Initial load time should reduce significantly with this method. There will still be a one-time hit as XAML/BAML is loaded but for subsequent charts, the startup time should be instant.
Please login first to submit.