Constant, high CPU usage after loading PDF file or stream in PdfDocumentView control

Hi, I noticed that PdfDocumentView control causes high, constant CPU usage (20-50%) after I use Load method.
This can be reproduced by unmodified sample application from solution Syncfusion\EssentialStudio\15.4.0.20\WPF\Pdf.WPF\Samples\Print\Silent Printing\CS\SilentPrinting_2017.sln
High CPU usage happens right after Load method is called.
Printing seems to work fine, but high CPU usage doesn't drop until I close the application.
I tried executing pdfViewer1.Unload(true) but this only makes CPU usage even higher (60-70%).
Is this known problem? Can I somehow bypass this?

I tried random older version 14.4.0.20 and problem is present there too. In Windows Forms version of this control (PdfViewerControl) problem doesn't occur.

Update: I tried on two different computers and a virtual machine and on every system problem appeared.

5 Replies

NK Navaneetha Kannan Sudalai Muthu Syncfusion Team January 8, 2018 12:37 PM UTC

Hi Waldemar,  

We are not able to reproduce the issue “PdfViewer causes large CPU usage when Load method is called”. The CPU usage is maintained between 11% to 16% when Load method is called.  We have also called Unload(true) after printing. The CPU usage is maintained in the same range for this case too. We have attached the screenshots for your reference in the below link.  


Please let us know how you are measuring CPU usage if it is different from measuring in Task Manager (as in screenshot). Kindly provide us with the following details of the systems in which you have reproduced the issue.  

1.       Visual Studio version (2015/2017) 
2.       Syncfusion Essential Studio version 
3.       Operating system 
4.       Bit type 
5.       Culture settings  
6.       RAM 

These details will help us understand the issue better and provide you with an appropriate solution.  

Best, 
Navaneetha Kannan


WB Waldemar Buraczewski January 8, 2018 01:05 PM UTC

Hi, thank you for verifying this issue.
I see that You confirmed that there is constant CPU usage of 12% on Your system after calling Load method. This behaviour is not correct, as it shouldn't be any constant CPU usage after loading of pdf data is done. Why doesn't CPU usage drop after Load operation is finished? This issue doesn't occur in Windows Forms version.
Anyway if You believe this behaviour is correct, then how should I make CPU usage drop to idle after I'm done using PdfDocumentView? I mean my larger program, not sample application. In my method I create PdfDocumentView, load PDF data, print and leave method, but CPU usage never drops to idle level.  

I think You might have more processor cores, so this is why You have lower CPU usage. I only have 2 physical cores and calling Load permanently consumes practically 100% of one core (thread).
Best regards


BS Balasubramanian Sundararajan Syncfusion Team January 19, 2018 10:51 AM UTC

Hi Waldemar, 

Thank you for your patience. 

We confirmed that the issue “PdfViewer causes large CPU usage when Load method is called” is a defect and we will include the fix for this issue in our Essential Studio 2018 Volume 1 SP1 release which is expected to rolled out in the month of March 2018. 

Root cause: 

We have used the BackgroundWorker for initializing the pages of the PDF document in the PDF viewer control, but this background worker is running even after loading all the pages of the PDF document in our PDF viewer control which causes the large CPU usage.  

Please let me know if you have any concern. 

Thanks, 
Balasubramanian S 



TA Taimoor March 1, 2018 01:08 AM UTC

Hi there ,

Is there any way this High processor usage can be managed now ?


BS Balasubramanian Sundararajan Syncfusion Team March 1, 2018 12:30 PM UTC

Hi Taimoor, 
 
Thank you for using Syncfusion product. 
 
As we mentioned in our previous update, we will include the fix for this issue “PDF Viewer causes large CPU usage when Load method is called” in our Essential Studio 2018 Volume 1 SP1 release which is expected to be rolled out in the month of March 2018.  
 
Please let me know if you have any concern. 
 
Thanks, 
Balasubramanian S 


Loader.
Up arrow icon