Pre loader

Tag: amount memory wpf directx acceleration

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1 vote
7k views

Hi,

I built a chart following your “series with metadata” example, and I use easy fallback… to switch from software and hardware rendering. Debugging the program I see my program entering in DirectXHeper class and choosing correctly from Direct3D10RenderSurface and HighSpeedRenderSurface (it depends from user preference).

I have a debug script that populates tha chart with random values. The result is shown in example1.png, every “candle” is built with 5 vertical numbers.

I notice a really strange issue. When using directx, the usage of memory grows a lot faster than software rendering. It becomes unstable after 1200 “candles” and with 1.5gb memory allocated.

I made a test, running the program for a while, the script generates about 900 “candles” with and without DirectX, as you can see in the 900CandlesWithDirectX.png and 900CandlesWithOutDirectX.png, the amount of memory is very different. It seems that with hardware acceleration the program doesn’t free the memory and it always continues to grow.

I immediately removed the check “3D acceleration”, but I would like to know how to solve this issue.

All the SharpDX.* are 2.6.3 version
Scichart.* Version 4.06.8482 Runtime v4.0.30319

here the definition of the chart:

    <s:SciChartSurface Name="sciChart" 
                    Grid.Row="0"
                    BorderThickness="0"
                    dirx:DirectXHelper.TryApplyDirectXRenderer="True"
                    s:ThemeManager.Theme="{Binding ElementName=ChangeThemeCombo, Path=SelectedItem}"
                    Padding="0"
                    VerticalAlignment="Stretch"
                    s:SciChartGroup.VerticalChartGroup="myCharts"
                    >

                        <!--  Declare RenderableSeries  -->
                        <s:SciChartSurface.RenderableSeries>
                            <s:FastLineRenderableSeries x:Name="lineSeries"

                                  StrokeThickness="2"
                                  PaletteProvider="{StaticResource GainLossPaletteProvider}"
                                  s:CursorModifier.TooltipTemplate="{StaticResource CursorTooltipTemplate}"
                                 >
                                <s:FastLineRenderableSeries.PointMarker>

                                    <seriesWithMetadata:AnnotatedPointMarker RenderPD="{Binding ElementName=lineSeries,Path=.}"  Width="5" Height="7" TextColor="White" ProgressBarColor="White"  AmountProgressBarFill="Orange" GainMarkerFill="LimeGreen" LossMarkerFill="Red" Stroke="White" StrokeThickness="1"  />
                                </s:FastLineRenderableSeries.PointMarker>

                            </s:FastLineRenderableSeries>

                        </s:SciChartSurface.RenderableSeries>

how can I understand where could the pitfall be ?
Thank you

  • lorenzo522 asked 8 years ago
  • last active 8 years ago
Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies