SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
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.
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
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.
I’ve spent some time investigating this issue and this is what I’ve discovered.
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.
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.
I have tested it on my laptop, and surprisingly I don’t have such problems on it, everything works perfect.Great :DI'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.
Please login first to submit.