Hi,
We are trying to initialize SciChart on application startup by calling SciChartSurface constructor. But it takes to much time, several seconds. It is seems to be that the problem is in a license check that takes to much time. Could you please check on this issue. Please find attached performance profiler session screenshot.
- yanr1984 asked 11 years ago
- You must login to post comments
Update: 2020 / SciChart v6.1
We have an update in Scichart v6.1 which addresses slow loading of native libraries in SciChart v6.0. The related forum post & solution can be found here.
- Andrew Burnett-Thompson answered 4 years ago
- You must login to post comments
Hello Yan,
Thanks for reporting this issue. I assume you including the license file as per instructions at http://www.scichart.com/licensing-scichart ?
In the current version of SciChart (v1.3) the license file is discovered automatically during startup. In v1.5 we have included the option to bootstrap the chart by supplying a license key before the chart is shown, for instance, during application initialization (instructions also here).
New to v1.5 – Preloading of license
key In v1.5 Beta if you have a license key in a non-XML format,
you can license the product by calling the following code. This must
be called once before any SciChartSurface instances
are created.
SciChartSurface.SetLicenseKey("77f1jagAG==@Gaagg...");
I am certain this new feature will help you. Please note the license keys for v1.3 are not compatible with v1.5. Please email us with your order ID and I’ll put you on the upgrade list.
Finally if licensing startup time continues to cause problems, one option is to become a source code customer. The source code distribution has no licensing code and is not obfuscated, so the library boots a lot faster.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 11 years ago
- last edited 8 years ago
-
Hi, I also had a slow startup and my problem was due to my creating a DataSeriesSet in the Window constructor immediately after the call to InitializeComponent() Moving it (and any other SciChart initialization) to the Window Loaded method got rid of a 5 second startup delay Kind Regards
-
Thanks for the feedback guys, I've created a task in our issue tracker and we will investigate
- You must login to post comments
Ok guys,
I’ve spent some time investigating this issue and this is what I’ve discovered.
Test Harness
See the attached images and source code. The test-application creates 50 SciChartSurfaces in an ItemsControl with WrapPanel. Each SciChartSurface has a single DataSeries/RenderSeries pair with 100 points of X-Y data.
Results
The result is the application starts up and renders all charts within 1 second (under the profiler this is 2,300ms). Of this 10% or 300ms of the time is spent creating the Data/Renderable series and 20% or 500ms of the time is spent performing a one-off licensing before the Chart is shown. Note I used a license key not null as per the test-app attached.
The rest of the time is evenly spent between OnApplyTemplate and constructors. I don’t see any exceptions (not even in the output window) when running this.
Improvements to SciChart
I ran these tests with SciChart Beta and around 20% of the time was spent in ThemeManager. In fact, if you turn the themes off the chart is a lot faster to start up. To do this, comment out the s:ThemeManager=”Random” line in the Test harness.
I’ve made some changes so SciChart now caches Themes – the creation of Resource Dictionaries and attaching to the chart takes a lot of time. This will be in the next release.
Suggestions for you guys
I didn’t see a 5 second delay, far from it, 1-2 seconds/50 charts = 40ms per chart. I didn’t see any exceptions either – can you please try this test-harness and report back on what you find? Exceptions may be a culture/parsing issue or perhaps an error with the compiled/obfuscated distribution of SciChart.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 11 years ago
-
Hi Andrew, The startup performance issue i had only with 1.3 version. In 1.5 it seems to be fine, but i had some first chance exceptions. I have tested it on my laptop, and surprisingly I don't have such problems on it, everything works perfect.
-
I have tested it on my laptop, and surprisingly I don’t have such problems on it, everything works perfect.
Great :D I'm still keen to see what those First Chance exceptions are. I don't see them (I have debugger -> Exceptions -> All on). Also I'm investigating general performance tuning of v1.5. Some users have mentioned that v1.5 is more stuttery than v1.3. Although the profiler suggests its actually faster (the drawing code), but perhaps we are causing more garbage collections. Rest assured, performance is very important to us so expect this to get even better over time.
- You must login to post comments
Please login first to submit.