cancel
Showing results for 
Search instead for 
Did you mean: 

CPU consumption by idle Crystal Reports WPF viewer

Former Member

Hi,

I am observing the following:

Given a simple WPF application that uses Crystal Reports WPF viewer (CR Runtime for Visual Studio SP20 installed): as soon as the report is loaded in the viewer, the application starts consuming CPU (2-5% on two-core machine), and that load persists for as long as the WPF form with WPF viewer remains on screen.

The load is not observed when the viewer is on screen without the report.

Apparently, that load is caused by the viewer's load animation (gradient bagel which is shown by CR WPF report viewer while the report is being loaded), which continues counting and updating the rotation transformation even after the report is loaded and the animation is collapsed.

This is observed at least on Win 10 Anniversary Update with .NET 4.7 and on Windows 2012 R2 with .NET 4.6.1

Questions:

1. Is it a known problem?

2. If so -- are there ways we could apply in the application utilizing the CR WPF report viewer to avoid that CPU load?

Thanks,

Alex

P.S. I can provide the source code, but it is as simple as standard VS 2015 WPF application with reference to CR WPF viewer and XAML for the MainWindow adjusted:

<Window x:Class="WpfApplication1.MainWindow"
...
  xmlns:cr="clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer"
...>
 <Grid>
 <cr:CrystalReportsViewer x:Name="MainReportViewer" ShowOpenFileButton="True" />
 </Grid>
</Window>

As soon as an RPT (in my case -- one with data saved inside) is loaded using viewer's open report button -- CPU consumption becomes non-zero. In our actual scenario the report is loaded from code, but resulting CPU consumption appears to be the same.

P.P.S. Tried to do some experiments under debugger, and when I managed to kill the transform for the ellipse -- CPU consumption dropped to zero. This is obviously not a solution, just a check to be sure the cause is identified correctly.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Fixed in SP 21

Answers (0)