Hello,
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.
- Steven Hansen asked 4 years ago
- You must login to post comments
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.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 4 years ago
- last edited 4 years ago
- You must login to post comments
Thanks for the quick reply Andrew. That function does the trick.
- Steven Hansen answered 4 years ago
-
Brilliant, glad to be of help! Don’t forget to mark my post as answer!
- You must login to post comments
Hi Steven
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 v6.1.0.13075 Released! Preloading SciChart native
libraries and async load licensing before a SciChartSurface is shownSome 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.
- SciChart2DInitializer.LoadLibrariesAndLicenseAsync
- SciChart2D3DInitializer.LoadLibrariesAndLicenseAsync
…
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.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 4 years ago
-
Hi Andrew, transfering the very long load time to the start of the application is a nice workaround. But will the load times be reduced to a much lower time in future releases? V5 was much faster! Regards Martin
-
Hi Martin! Yes, version 6.2 (which is in QA testing before release now) has an improvement to startup time making it **28 times faster to load the first chart**. In addition with async loading this should make scichart app startup times imperceptible. We aim to release it this week.
- You must login to post comments
Please login first to submit.